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

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

Issue 2777803002: Revert of Add operator<< to StyleDifference for debug logging. (Closed)
Patch Set: resolve conflict Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleDifference.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/style/StyleDifference.h"
6
7 #include <sstream>
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace blink {
11
12 TEST(StyleDifferenceTest, StreamOutputDefault) {
13 std::stringstream stringStream;
14 StyleDifference diff;
15 stringStream << diff;
16 EXPECT_EQ(
17 "StyleDifference{layoutType=NoLayout, "
18 "paintInvalidationType=NoPaintInvalidation, recomputeOverflow=0, "
19 "visualRectUpdate=0, propertySpecificDifferences=}",
20 stringStream.str());
21 }
22
23 TEST(StyleDifferenceTest, StreamOutputAllFieldsMutated) {
24 std::stringstream stringStream;
25 StyleDifference diff;
26 diff.setNeedsPaintInvalidationObject();
27 diff.setNeedsPositionedMovementLayout();
28 diff.setNeedsRecomputeOverflow();
29 diff.setNeedsVisualRectUpdate();
30 diff.setTransformChanged();
31 diff.setScrollAnchorDisablingPropertyChanged();
32 stringStream << diff;
33 EXPECT_EQ(
34 "StyleDifference{layoutType=PositionedMovement, "
35 "paintInvalidationType=PaintInvalidationObject, recomputeOverflow=1, "
36 "visualRectUpdate=1, "
37 "propertySpecificDifferences=TransformChanged|"
38 "ScrollAnchorDisablingPropertyChanged|TransformChanged|"
39 "ScrollAnchorDisablingPropertyChanged}",
40 stringStream.str());
41 }
42
43 TEST(StyleDifferenceTest, StreamOutputSetAllProperties) {
44 std::stringstream stringStream;
45 StyleDifference diff;
46 diff.setTransformChanged();
47 diff.setOpacityChanged();
48 diff.setZIndexChanged();
49 diff.setFilterChanged();
50 diff.setBackdropFilterChanged();
51 diff.setCSSClipChanged();
52 diff.setTextDecorationOrColorChanged();
53 diff.setScrollAnchorDisablingPropertyChanged();
54 stringStream << diff;
55 EXPECT_EQ(
56 "StyleDifference{layoutType=NoLayout, "
57 "paintInvalidationType=NoPaintInvalidation, recomputeOverflow=0, "
58 "visualRectUpdate=0, "
59 "propertySpecificDifferences=TransformChanged|OpacityChanged|"
60 "ZIndexChanged|FilterChanged|BackdropFilterChanged|CSSClipChanged|"
61 "TextDecorationOrColorChanged|ScrollAnchorDisablingPropertyChanged|"
62 "TransformChanged|OpacityChanged|ZIndexChanged|FilterChanged|"
63 "BackdropFilterChanged|CSSClipChanged|TextDecorationOrColorChanged|"
64 "ScrollAnchorDisablingPropertyChanged}",
65 stringStream.str());
66 }
67
68 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleDifference.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698