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

Unified Diff: Source/core/layout/style/SVGComputedStyleTest.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/core/layout/style/SVGComputedStyleDefs.cpp ('k') | Source/core/layout/style/SVGLayoutStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/SVGComputedStyleTest.cpp
diff --git a/Source/core/layout/style/SVGLayoutStyleTest.cpp b/Source/core/layout/style/SVGComputedStyleTest.cpp
similarity index 51%
rename from Source/core/layout/style/SVGLayoutStyleTest.cpp
rename to Source/core/layout/style/SVGComputedStyleTest.cpp
index 7f0c90f5ca47c40ee497a1356917d89afd9d6397..d69d6eab480b28a79625fdffd44f70ae37263000 100644
--- a/Source/core/layout/style/SVGLayoutStyleTest.cpp
+++ b/Source/core/layout/style/SVGComputedStyleTest.cpp
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "config.h"
-#include "core/layout/style/SVGLayoutStyle.h"
+#include "core/layout/style/SVGComputedStyle.h"
#include <gtest/gtest.h>
@@ -14,8 +14,8 @@ namespace {
// Ensures RefPtr values are compared by their values, not by pointers.
#define TEST_STYLE_REFPTR_VALUE_NO_DIFF(type, fieldName) \
{ \
- RefPtr<SVGLayoutStyle> svg1 = SVGLayoutStyle::create(); \
- RefPtr<SVGLayoutStyle> svg2 = SVGLayoutStyle::create(); \
+ RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create(); \
+ RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create(); \
RefPtr<type> value1 = type::create(); \
RefPtr<type> value2 = value1->copy(); \
svg1->set##fieldName(value1); \
@@ -28,14 +28,14 @@ namespace {
// when we change some field to RefPtr in the future.
#define TEST_STYLE_VALUE_NO_DIFF(type, fieldName) \
{ \
- RefPtr<SVGLayoutStyle> svg1 = SVGLayoutStyle::create(); \
- RefPtr<SVGLayoutStyle> svg2 = SVGLayoutStyle::create(); \
- svg1->set##fieldName(SVGLayoutStyle::initial##fieldName()); \
- svg2->set##fieldName(SVGLayoutStyle::initial##fieldName()); \
+ RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create(); \
+ RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create(); \
+ svg1->set##fieldName(SVGComputedStyle::initial##fieldName()); \
+ svg2->set##fieldName(SVGComputedStyle::initial##fieldName()); \
EXPECT_FALSE(svg1->diff(svg2.get()).hasDifference()); \
}
-TEST(SVGLayoutStyleTest, StrokeStyleShouldCompareValue)
+TEST(SVGComputedStyleTest, StrokeStyleShouldCompareValue)
{
TEST_STYLE_VALUE_NO_DIFF(float, StrokeOpacity);
TEST_STYLE_VALUE_NO_DIFF(float, StrokeMiterLimit);
@@ -44,22 +44,22 @@ TEST(SVGLayoutStyleTest, StrokeStyleShouldCompareValue)
TEST_STYLE_REFPTR_VALUE_NO_DIFF(SVGDashArray, StrokeDashArray);
{
- RefPtr<SVGLayoutStyle> svg1 = SVGLayoutStyle::create();
- RefPtr<SVGLayoutStyle> svg2 = SVGLayoutStyle::create();
- svg1->setStrokePaint(SVGLayoutStyle::initialStrokePaintType(), SVGLayoutStyle::initialStrokePaintColor(), SVGLayoutStyle::initialStrokePaintUri(), true, false);
- svg2->setStrokePaint(SVGLayoutStyle::initialStrokePaintType(), SVGLayoutStyle::initialStrokePaintColor(), SVGLayoutStyle::initialStrokePaintUri(), true, false);
+ RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create();
+ RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create();
+ svg1->setStrokePaint(SVGComputedStyle::initialStrokePaintType(), SVGComputedStyle::initialStrokePaintColor(), SVGComputedStyle::initialStrokePaintUri(), true, false);
+ svg2->setStrokePaint(SVGComputedStyle::initialStrokePaintType(), SVGComputedStyle::initialStrokePaintColor(), SVGComputedStyle::initialStrokePaintUri(), true, false);
EXPECT_FALSE(svg1->diff(svg2.get()).hasDifference());
}
{
- RefPtr<SVGLayoutStyle> svg1 = SVGLayoutStyle::create();
- RefPtr<SVGLayoutStyle> svg2 = SVGLayoutStyle::create();
- svg1->setStrokePaint(SVGLayoutStyle::initialStrokePaintType(), SVGLayoutStyle::initialStrokePaintColor(), SVGLayoutStyle::initialStrokePaintUri(), false, true);
- svg2->setStrokePaint(SVGLayoutStyle::initialStrokePaintType(), SVGLayoutStyle::initialStrokePaintColor(), SVGLayoutStyle::initialStrokePaintUri(), false, true);
+ RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create();
+ RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create();
+ svg1->setStrokePaint(SVGComputedStyle::initialStrokePaintType(), SVGComputedStyle::initialStrokePaintColor(), SVGComputedStyle::initialStrokePaintUri(), false, true);
+ svg2->setStrokePaint(SVGComputedStyle::initialStrokePaintType(), SVGComputedStyle::initialStrokePaintColor(), SVGComputedStyle::initialStrokePaintUri(), false, true);
EXPECT_FALSE(svg1->diff(svg2.get()).hasDifference());
}
}
-TEST(SVGLayoutStyleTest, MiscStyleShouldCompareValue)
+TEST(SVGComputedStyleTest, MiscStyleShouldCompareValue)
{
TEST_STYLE_VALUE_NO_DIFF(Color, FloodColor);
TEST_STYLE_VALUE_NO_DIFF(float, FloodOpacity);
« no previous file with comments | « Source/core/layout/style/SVGComputedStyleDefs.cpp ('k') | Source/core/layout/style/SVGLayoutStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698