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

Side by Side Diff: third_party/WebKit/Source/core/style/SVGComputedStyleTest.cpp

Issue 2753013004: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text
Patch Set: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/style/SVGComputedStyle.h" 5 #include "core/style/SVGComputedStyle.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 17 matching lines...) Expand all
28 RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create(); \ 28 RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create(); \
29 RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create(); \ 29 RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create(); \
30 svg1->set##fieldName(SVGComputedStyle::initial##fieldName()); \ 30 svg1->set##fieldName(SVGComputedStyle::initial##fieldName()); \
31 svg2->set##fieldName(SVGComputedStyle::initial##fieldName()); \ 31 svg2->set##fieldName(SVGComputedStyle::initial##fieldName()); \
32 EXPECT_FALSE(svg1->diff(svg2.get()).hasDifference()); \ 32 EXPECT_FALSE(svg1->diff(svg2.get()).hasDifference()); \
33 } 33 }
34 34
35 TEST(SVGComputedStyleTest, StrokeStyleShouldCompareValue) { 35 TEST(SVGComputedStyleTest, StrokeStyleShouldCompareValue) {
36 TEST_STYLE_VALUE_NO_DIFF(float, StrokeOpacity); 36 TEST_STYLE_VALUE_NO_DIFF(float, StrokeOpacity);
37 TEST_STYLE_VALUE_NO_DIFF(float, StrokeMiterLimit); 37 TEST_STYLE_VALUE_NO_DIFF(float, StrokeMiterLimit);
38 TEST_STYLE_VALUE_NO_DIFF(UnzoomedLength, StrokeWidth);
39 TEST_STYLE_VALUE_NO_DIFF(Length, StrokeDashOffset); 38 TEST_STYLE_VALUE_NO_DIFF(Length, StrokeDashOffset);
40 TEST_STYLE_REFPTR_VALUE_NO_DIFF(SVGDashArray, StrokeDashArray); 39 TEST_STYLE_REFPTR_VALUE_NO_DIFF(SVGDashArray, StrokeDashArray);
41 40
42 { 41 {
43 RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create(); 42 RefPtr<SVGComputedStyle> svg1 = SVGComputedStyle::create();
44 RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create(); 43 RefPtr<SVGComputedStyle> svg2 = SVGComputedStyle::create();
45 svg1->setStrokePaint(SVGComputedStyle::initialStrokePaintType(), 44 svg1->setStrokePaint(SVGComputedStyle::initialStrokePaintType(),
46 SVGComputedStyle::initialStrokePaintColor(), 45 SVGComputedStyle::initialStrokePaintColor(),
47 SVGComputedStyle::initialStrokePaintUri(), true, 46 SVGComputedStyle::initialStrokePaintUri(), true,
48 false); 47 false);
(...skipping 19 matching lines...) Expand all
68 } 67 }
69 68
70 TEST(SVGComputedStyleTest, MiscStyleShouldCompareValue) { 69 TEST(SVGComputedStyleTest, MiscStyleShouldCompareValue) {
71 TEST_STYLE_VALUE_NO_DIFF(Color, FloodColor); 70 TEST_STYLE_VALUE_NO_DIFF(Color, FloodColor);
72 TEST_STYLE_VALUE_NO_DIFF(float, FloodOpacity); 71 TEST_STYLE_VALUE_NO_DIFF(float, FloodOpacity);
73 TEST_STYLE_VALUE_NO_DIFF(Color, LightingColor); 72 TEST_STYLE_VALUE_NO_DIFF(Color, LightingColor);
74 TEST_STYLE_VALUE_NO_DIFF(Length, BaselineShiftValue); 73 TEST_STYLE_VALUE_NO_DIFF(Length, BaselineShiftValue);
75 } 74 }
76 75
77 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698