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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinderTest.cpp

Issue 2504573002: Don't call isURLAllowed() from layout. (Closed)
Patch Set: Fix bad formatting that caused clang-format-diff to get confused. Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/layout/compositing/CompositingReasonFinder.h" 5 #include "core/layout/compositing/CompositingReasonFinder.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/LayoutBlock.h" 8 #include "core/layout/LayoutBlock.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/paint/PaintLayer.h" 10 #include "core/paint/PaintLayer.h"
11 #include "platform/graphics/GraphicsLayer.h" 11 #include "platform/graphics/GraphicsLayer.h"
12 #include "platform/scroll/ScrollTypes.h" 12 #include "platform/scroll/ScrollTypes.h"
13 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" 13 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class CompositingReasonFinderTest : public RenderingTest { 17 class CompositingReasonFinderTest : public RenderingTest {
18 public: 18 public:
19 CompositingReasonFinderTest() 19 CompositingReasonFinderTest()
20 : RenderingTest(SingleChildFrameLoaderClient::create()) {} 20 : RenderingTest(EmptyFrameLoaderClient::create()) {}
21 21
22 private: 22 private:
23 void SetUp() override { 23 void SetUp() override {
24 RenderingTest::SetUp(); 24 RenderingTest::SetUp();
25 enableCompositing(); 25 enableCompositing();
26 } 26 }
27 }; 27 };
28 28
29 TEST_F(CompositingReasonFinderTest, PromoteOpaqueFixedPosition) { 29 TEST_F(CompositingReasonFinderTest, PromoteOpaqueFixedPosition) {
30 ScopedCompositeFixedPositionForTest compositeFixedPosition(true); 30 ScopedCompositeFixedPositionForTest compositeFixedPosition(true);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 EXPECT_TRUE(paintLayer->graphicsLayerBacking()->contentsOpaque()); 153 EXPECT_TRUE(paintLayer->graphicsLayerBacking()->contentsOpaque());
154 154
155 // Make the fixed translucent. 155 // Make the fixed translucent.
156 fixed->setAttribute(HTMLNames::styleAttr, "opacity: 0.5"); 156 fixed->setAttribute(HTMLNames::styleAttr, "opacity: 0.5");
157 document().view()->updateAllLifecyclePhases(); 157 document().view()->updateAllLifecyclePhases();
158 paintLayer = toLayoutBoxModelObject(fixed->layoutObject())->layer(); 158 paintLayer = toLayoutBoxModelObject(fixed->layoutObject())->layer();
159 ASSERT_TRUE(paintLayer); 159 ASSERT_TRUE(paintLayer);
160 EXPECT_EQ(NotComposited, paintLayer->compositingState()); 160 EXPECT_EQ(NotComposited, paintLayer->compositingState());
161 } 161 }
162 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698