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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyleTest.cpp

Issue 2895933004: Pass the correct BorderWidth value when creating BorderValues (Closed)
Patch Set: add computedstyle unit tes Created 3 years, 7 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 | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyleTest.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp b/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp
index 392e89efb15b932da72d33dd1af78b9b7ffedf92..47c93a97ca10053853d37f4b5673638ee3c5321d 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp
@@ -102,7 +102,7 @@ TEST(ComputedStyleTest,
EXPECT_TRUE(diff.TransformChanged());
}
-TEST(CompuetedStyleTest, HasOutlineWithCurrentColor) {
+TEST(ComputedStyleTest, HasOutlineWithCurrentColor) {
nainar 2017/05/23 05:06:50 These were spelt incorrectly and never ran before.
RefPtr<ComputedStyle> style = ComputedStyle::Create();
EXPECT_FALSE(style->HasOutline());
EXPECT_FALSE(style->HasOutlineWithCurrentColor());
@@ -114,7 +114,7 @@ TEST(CompuetedStyleTest, HasOutlineWithCurrentColor) {
EXPECT_TRUE(style->HasOutlineWithCurrentColor());
}
-TEST(CompuetedStyleTest, HasBorderColorReferencingCurrentColor) {
+TEST(ComputedStyleTest, HasBorderColorReferencingCurrentColor) {
RefPtr<ComputedStyle> style = ComputedStyle::Create();
EXPECT_FALSE(style->HasBorderColorReferencingCurrentColor());
style->SetBorderBottomColor(StyleColor::CurrentColor());
@@ -125,4 +125,14 @@ TEST(CompuetedStyleTest, HasBorderColorReferencingCurrentColor) {
EXPECT_TRUE(style->HasBorderColorReferencingCurrentColor());
}
+TEST(ComputedStyleTest, BorderWidth) {
+ RefPtr<ComputedStyle> style = ComputedStyle::Create();
nainar 2017/05/23 05:06:50 Happy to copy this test for all Border*Width.
+ style->SetBorderBottomWidth(5);
+ EXPECT_EQ(style->BorderBottomWidth(), 0);
+ EXPECT_EQ(style->BorderBottom().Width(), 5);
+ style->SetBorderBottomStyle(EBorderStyle::kSolid);
+ EXPECT_EQ(style->BorderBottomWidth(), 5);
+ EXPECT_EQ(style->BorderBottom().Width(), 5);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698