diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/dom/element_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/dom/element_test.cc | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/chromium/third_party/blink/renderer/core/dom/element_test.cc b/chromium/third_party/blink/renderer/core/dom/element_test.cc index 8ab66b130d1..83346d25b0b 100644 --- a/chromium/third_party/blink/renderer/core/dom/element_test.cc +++ b/chromium/third_party/blink/renderer/core/dom/element_test.cc @@ -30,8 +30,7 @@ TEST_F(ElementTest, SupportsFocus) { Document& document = GetDocument(); DCHECK(IsA<HTMLHtmlElement>(document.documentElement())); document.setDesignMode("on"); - document.View()->UpdateAllLifecyclePhases( - DocumentLifecycle::LifecycleUpdateReason::kTest); + document.View()->UpdateAllLifecyclePhases(DocumentUpdateReason::kTest); EXPECT_TRUE(document.documentElement()->SupportsFocus()) << "<html> with designMode=on should be focusable."; } @@ -66,8 +65,7 @@ TEST_F(ElementTest, // Insert a new <div> above the sticky. This will dirty layout and invalidate // the sticky constraints. - writer->SetInnerHTMLFromString( - "<div style='height: 100px; width: 700px;'></div>"); + writer->setInnerHTML("<div style='height: 100px; width: 700px;'></div>"); EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, document.Lifecycle().GetState()); @@ -111,8 +109,7 @@ TEST_F(ElementTest, OffsetTopAndLeftCorrectForStickyElementsAfterInsertion) { // Insert a new <div> above the sticky. This will dirty layout and invalidate // the sticky constraints. - writer->SetInnerHTMLFromString( - "<div style='height: 100px; width: 700px;'></div>"); + writer->setInnerHTML("<div style='height: 100px; width: 700px;'></div>"); EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, document.Lifecycle().GetState()); @@ -126,8 +123,7 @@ TEST_F(ElementTest, OffsetTopAndLeftCorrectForStickyElementsAfterInsertion) { ->NeedsCompositingInputsUpdate()); // Dirty layout again, since |OffsetTop| will have cleaned it. - writer->SetInnerHTMLFromString( - "<div style='height: 100px; width: 700px;'></div>"); + writer->setInnerHTML("<div style='height: 100px; width: 700px;'></div>"); EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, document.Lifecycle().GetState()); @@ -169,8 +165,7 @@ TEST_F(ElementTest, BoundsInViewportCorrectForStickyElementsAfterInsertion) { // Insert a new <div> above the sticky. This will dirty layout and invalidate // the sticky constraints. - writer->SetInnerHTMLFromString( - "<div style='height: 100px; width: 700px;'></div>"); + writer->setInnerHTML("<div style='height: 100px; width: 700px;'></div>"); EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, document.Lifecycle().GetState()); @@ -224,8 +219,7 @@ TEST_F(ElementTest, StickySubtreesAreTrackedCorrectly) { // ensure that the sticky subtree update behavior survives forking. document.getElementById("child")->SetInlineStyleProperty( CSSPropertyID::kWebkitRubyPosition, CSSValueID::kAfter); - document.View()->UpdateAllLifecyclePhases( - DocumentLifecycle::LifecycleUpdateReason::kTest); + document.View()->UpdateAllLifecyclePhases(DocumentUpdateReason::kTest); EXPECT_EQ(DocumentLifecycle::kPaintClean, document.Lifecycle().GetState()); EXPECT_EQ(RubyPosition::kBefore, outer_sticky->StyleRef().GetRubyPosition()); @@ -247,8 +241,7 @@ TEST_F(ElementTest, StickySubtreesAreTrackedCorrectly) { // fork it's StyleRareInheritedData to maintain the sticky subtree bit. document.getElementById("outerSticky") ->SetInlineStyleProperty(CSSPropertyID::kPosition, CSSValueID::kStatic); - document.View()->UpdateAllLifecyclePhases( - DocumentLifecycle::LifecycleUpdateReason::kTest); + document.View()->UpdateAllLifecyclePhases(DocumentUpdateReason::kTest); EXPECT_EQ(DocumentLifecycle::kPaintClean, document.Lifecycle().GetState()); EXPECT_FALSE(outer_sticky->StyleRef().SubtreeIsSticky()); @@ -469,11 +462,6 @@ TEST_F(ElementTest, OptionElementDisplayNoneComputedStyle) { EXPECT_FALSE(document.getElementById("inner-option")->GetComputedStyle()); } -template <> -struct DowncastTraits<HTMLPlugInElement> { - static bool AllowFrom(const Node& n) { return IsHTMLPlugInElement(n); } -}; - // A fake plugin which will assert that script is allowed in Destroy. class ScriptOnDestroyPlugin : public GarbageCollected<ScriptOnDestroyPlugin>, public WebPlugin { @@ -488,16 +476,16 @@ class ScriptOnDestroyPlugin : public GarbageCollected<ScriptOnDestroyPlugin>, } WebPluginContainer* Container() const override { return container_; } - void UpdateAllLifecyclePhases(WebWidget::LifecycleUpdateReason) override {} + void UpdateAllLifecyclePhases(DocumentUpdateReason) override {} void Paint(cc::PaintCanvas*, const WebRect&) override {} void UpdateGeometry(const WebRect&, const WebRect&, const WebRect&, bool) override {} - void UpdateFocus(bool, WebFocusType) override {} + void UpdateFocus(bool, mojom::blink::FocusType) override {} void UpdateVisibility(bool) override {} WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&, - WebCursorInfo&) override { + ui::Cursor*) override { return {}; } void DidReceiveResponse(const WebURLResponse&) override {} @@ -505,7 +493,7 @@ class ScriptOnDestroyPlugin : public GarbageCollected<ScriptOnDestroyPlugin>, void DidFinishLoading() override {} void DidFailLoading(const WebURLError&) override {} - void Trace(blink::Visitor*) {} + void Trace(Visitor*) {} bool DestroyCalled() const { return destroy_called_; } |