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

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

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/ComputedStyle.h" 5 #include "core/style/ComputedStyle.h"
6 6
7 #include "core/layout/ClipPathOperation.h" 7 #include "core/layout/ClipPathOperation.h"
8 #include "core/style/ShapeValue.h" 8 #include "core/style/ShapeValue.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TEST(ComputedStyleTest, ShapeOutsideBoxEqual) 13 TEST(ComputedStyleTest, ShapeOutsideBoxEqual)
14 { 14 {
15 RefPtrWillBeRawPtr<ShapeValue> shape1 = ShapeValue::createBoxShapeValue(Cont entBox); 15 RawPtr<ShapeValue> shape1 = ShapeValue::createBoxShapeValue(ContentBox);
16 RefPtrWillBeRawPtr<ShapeValue> shape2 = ShapeValue::createBoxShapeValue(Cont entBox); 16 RawPtr<ShapeValue> shape2 = ShapeValue::createBoxShapeValue(ContentBox);
17 RefPtr<ComputedStyle> style1 = ComputedStyle::create(); 17 RefPtr<ComputedStyle> style1 = ComputedStyle::create();
18 RefPtr<ComputedStyle> style2 = ComputedStyle::create(); 18 RefPtr<ComputedStyle> style2 = ComputedStyle::create();
19 style1->setShapeOutside(shape1); 19 style1->setShapeOutside(shape1);
20 style2->setShapeOutside(shape2); 20 style2->setShapeOutside(shape2);
21 ASSERT_EQ(*style1, *style2); 21 ASSERT_EQ(*style1, *style2);
22 } 22 }
23 23
24 TEST(ComputedStyleTest, ShapeOutsideCircleEqual) 24 TEST(ComputedStyleTest, ShapeOutsideCircleEqual)
25 { 25 {
26 RefPtr<BasicShapeCircle> circle1 = BasicShapeCircle::create(); 26 RefPtr<BasicShapeCircle> circle1 = BasicShapeCircle::create();
27 RefPtr<BasicShapeCircle> circle2 = BasicShapeCircle::create(); 27 RefPtr<BasicShapeCircle> circle2 = BasicShapeCircle::create();
28 RefPtrWillBeRawPtr<ShapeValue> shape1 = ShapeValue::createShapeValue(circle1 , ContentBox); 28 RawPtr<ShapeValue> shape1 = ShapeValue::createShapeValue(circle1, ContentBox );
29 RefPtrWillBeRawPtr<ShapeValue> shape2 = ShapeValue::createShapeValue(circle2 , ContentBox); 29 RawPtr<ShapeValue> shape2 = ShapeValue::createShapeValue(circle2, ContentBox );
30 RefPtr<ComputedStyle> style1 = ComputedStyle::create(); 30 RefPtr<ComputedStyle> style1 = ComputedStyle::create();
31 RefPtr<ComputedStyle> style2 = ComputedStyle::create(); 31 RefPtr<ComputedStyle> style2 = ComputedStyle::create();
32 style1->setShapeOutside(shape1); 32 style1->setShapeOutside(shape1);
33 style2->setShapeOutside(shape2); 33 style2->setShapeOutside(shape2);
34 ASSERT_EQ(*style1, *style2); 34 ASSERT_EQ(*style1, *style2);
35 } 35 }
36 36
37 TEST(ComputedStyleTest, ClipPathEqual) 37 TEST(ComputedStyleTest, ClipPathEqual)
38 { 38 {
39 RefPtr<BasicShapeCircle> shape = BasicShapeCircle::create(); 39 RefPtr<BasicShapeCircle> shape = BasicShapeCircle::create();
40 RefPtr<ShapeClipPathOperation> path1 = ShapeClipPathOperation::create(shape) ; 40 RefPtr<ShapeClipPathOperation> path1 = ShapeClipPathOperation::create(shape) ;
41 RefPtr<ShapeClipPathOperation> path2 = ShapeClipPathOperation::create(shape) ; 41 RefPtr<ShapeClipPathOperation> path2 = ShapeClipPathOperation::create(shape) ;
42 RefPtr<ComputedStyle> style1 = ComputedStyle::create(); 42 RefPtr<ComputedStyle> style1 = ComputedStyle::create();
43 RefPtr<ComputedStyle> style2 = ComputedStyle::create(); 43 RefPtr<ComputedStyle> style2 = ComputedStyle::create();
44 style1->setClipPath(path1); 44 style1->setClipPath(path1);
45 style2->setClipPath(path2); 45 style2->setClipPath(path2);
46 ASSERT_EQ(*style1, *style2); 46 ASSERT_EQ(*style1, *style2);
47 } 47 }
48 48
49 } // namespace blink 49 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/ContentData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698