Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Unified Diff: Source/web/tests/WebDocumentTest.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/mac/WebSubstringUtil.mm ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebDocumentTest.cpp
diff --git a/Source/web/tests/WebDocumentTest.cpp b/Source/web/tests/WebDocumentTest.cpp
index 71a213eaa83c87787db451e5f897da6bc9a9920f..48158a77f482fde3b4b0b51faa1a88a94889b640 100644
--- a/Source/web/tests/WebDocumentTest.cpp
+++ b/Source/web/tests/WebDocumentTest.cpp
@@ -7,11 +7,11 @@
#include "public/web/WebDocument.h"
#include "core/CSSPropertyNames.h"
-#include "core/dom/NodeLayoutStyle.h"
+#include "core/dom/NodeComputedStyle.h"
#include "core/dom/StyleEngine.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLElement.h"
-#include "core/layout/style/LayoutStyle.h"
+#include "core/layout/style/ComputedStyle.h"
#include "core/page/Page.h"
#include "platform/graphics/Color.h"
#include "platform/testing/URLTestHelpers.h"
@@ -41,7 +41,7 @@ TEST(WebDocumentTest, InsertStyleSheet)
HTMLElement* bodyElement = coreDoc->body();
ASSERT(bodyElement);
- const LayoutStyle& styleBeforeInsertion = bodyElement->layoutStyleRef();
+ const ComputedStyle& styleBeforeInsertion = bodyElement->computedStyleRef();
// Inserted stylesheet not yet applied.
ASSERT_EQ(Color(0, 0, 0), styleBeforeInsertion.visitedDependentColor(CSSPropertyColor));
@@ -49,7 +49,7 @@ TEST(WebDocumentTest, InsertStyleSheet)
// Apply inserted stylesheet.
coreDoc->updateRenderTreeIfNeeded();
- const LayoutStyle& styleAfterInsertion = bodyElement->layoutStyleRef();
+ const ComputedStyle& styleAfterInsertion = bodyElement->computedStyleRef();
// Inserted stylesheet applied.
ASSERT_EQ(Color(0, 128, 0), styleAfterInsertion.visitedDependentColor(CSSPropertyColor));
@@ -71,13 +71,13 @@ TEST(WebDocumentTest, BeginExitTransition)
Element* transitionElement = coreDoc->getElementById("foo");
ASSERT(transitionElement);
- const LayoutStyle* transitionStyle = transitionElement->layoutStyle();
+ const ComputedStyle* transitionStyle = transitionElement->computedStyle();
ASSERT(transitionStyle);
HTMLElement* bodyElement = coreDoc->body();
ASSERT(bodyElement);
- const LayoutStyle* bodyStyle = bodyElement->layoutStyle();
+ const ComputedStyle* bodyStyle = bodyElement->computedStyle();
ASSERT(bodyStyle);
// The transition_exit.css stylesheet should not have been applied at this point.
ASSERT_EQ(Color(0, 0, 0), bodyStyle->visitedDependentColor(CSSPropertyColor));
@@ -89,12 +89,12 @@ TEST(WebDocumentTest, BeginExitTransition)
coreDoc->updateRenderTreeIfNeeded();
// The element should now be hidden.
- transitionStyle = transitionElement->layoutStyle();
+ transitionStyle = transitionElement->computedStyle();
ASSERT_TRUE(transitionStyle);
ASSERT_EQ(transitionStyle->opacity(), 0);
// The stylesheet should now have been applied.
- bodyStyle = bodyElement->layoutStyle();
+ bodyStyle = bodyElement->computedStyle();
ASSERT(bodyStyle);
ASSERT_EQ(Color(0, 128, 0), bodyStyle->visitedDependentColor(CSSPropertyColor));
}
@@ -116,13 +116,13 @@ TEST(WebDocumentTest, BeginExitTransitionToNativeApp)
Element* transitionElement = coreDoc->getElementById("foo");
ASSERT(transitionElement);
- const LayoutStyle* transitionStyle = transitionElement->layoutStyle();
+ const ComputedStyle* transitionStyle = transitionElement->computedStyle();
ASSERT(transitionStyle);
HTMLElement* bodyElement = coreDoc->body();
ASSERT(bodyElement);
- const LayoutStyle* bodyStyle = bodyElement->layoutStyle();
+ const ComputedStyle* bodyStyle = bodyElement->computedStyle();
ASSERT(bodyStyle);
// The transition_exit.css stylesheet should not have been applied at this point.
ASSERT_EQ(Color(0, 0, 0), bodyStyle->visitedDependentColor(CSSPropertyColor));
@@ -134,12 +134,12 @@ TEST(WebDocumentTest, BeginExitTransitionToNativeApp)
coreDoc->updateRenderTreeIfNeeded();
// The element should not be hidden.
- transitionStyle = transitionElement->layoutStyle();
+ transitionStyle = transitionElement->computedStyle();
ASSERT_TRUE(transitionStyle);
ASSERT_EQ(transitionStyle->opacity(), 1);
// The stylesheet should now have been applied.
- bodyStyle = bodyElement->layoutStyle();
+ bodyStyle = bodyElement->computedStyle();
ASSERT(bodyStyle);
ASSERT_EQ(Color(0, 128, 0), bodyStyle->visitedDependentColor(CSSPropertyColor));
}
@@ -159,7 +159,7 @@ TEST(WebDocumentTest, HideAndShowTransitionElements)
Element* transitionElement = coreDoc->getElementById("foo");
ASSERT(transitionElement);
- const LayoutStyle* transitionStyle = transitionElement->layoutStyle();
+ const ComputedStyle* transitionStyle = transitionElement->computedStyle();
ASSERT(transitionStyle);
EXPECT_EQ(transitionStyle->opacity(), 1);
@@ -167,7 +167,7 @@ TEST(WebDocumentTest, HideAndShowTransitionElements)
frame->document().hideTransitionElements("#foo");
FrameTestHelpers::pumpPendingRequestsDoNotUse(frame);
coreDoc->updateRenderTreeIfNeeded();
- transitionStyle = transitionElement->layoutStyle();
+ transitionStyle = transitionElement->computedStyle();
ASSERT_TRUE(transitionStyle);
EXPECT_EQ(transitionStyle->opacity(), 0);
@@ -175,7 +175,7 @@ TEST(WebDocumentTest, HideAndShowTransitionElements)
frame->document().showTransitionElements("#foo");
FrameTestHelpers::pumpPendingRequestsDoNotUse(frame);
coreDoc->updateRenderTreeIfNeeded();
- transitionStyle = transitionElement->layoutStyle();
+ transitionStyle = transitionElement->computedStyle();
ASSERT_TRUE(transitionStyle);
EXPECT_EQ(transitionStyle->opacity(), 1);
}
« no previous file with comments | « Source/web/mac/WebSubstringUtil.mm ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698