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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObjectTest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/LayoutObject.h" 5 #include "core/layout/LayoutObject.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/LayoutTestHelper.h" 8 #include "core/layout/LayoutTestHelper.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "platform/json/JSONValues.h" 10 #include "platform/json/JSONValues.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class LayoutObjectTest : public RenderingTest { 15 class LayoutObjectTest : public RenderingTest {
16 public: 16 public:
17 LayoutObjectTest() : RenderingTest(SingleChildFrameLoaderClient::create()) {} 17 LayoutObjectTest() : RenderingTest(EmptyFrameLoaderClient::create()) {}
18 }; 18 };
19 19
20 TEST_F(LayoutObjectTest, LayoutDecoratedNameCalledWithPositionedObject) { 20 TEST_F(LayoutObjectTest, LayoutDecoratedNameCalledWithPositionedObject) {
21 setBodyInnerHTML("<div id='div' style='position: fixed'>test</div>"); 21 setBodyInnerHTML("<div id='div' style='position: fixed'>test</div>");
22 Element* div = document().getElementById(AtomicString("div")); 22 Element* div = document().getElementById(AtomicString("div"));
23 ASSERT(div); 23 ASSERT(div);
24 LayoutObject* obj = div->layoutObject(); 24 LayoutObject* obj = div->layoutObject();
25 ASSERT(obj); 25 ASSERT(obj);
26 EXPECT_STREQ("LayoutBlockFlow (positioned)", 26 EXPECT_STREQ("LayoutBlockFlow (positioned)",
27 obj->decoratedName().ascii().data()); 27 obj->decoratedName().ascii().data());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 " </div>" 118 " </div>"
119 "</div>"); 119 "</div>");
120 120
121 LayoutObject* overflowClipObject = 121 LayoutObject* overflowClipObject =
122 getLayoutObjectByElementId("overflow-clip-layer"); 122 getLayoutObjectByElementId("overflow-clip-layer");
123 LayoutBlock* columns = toLayoutBlock(getLayoutObjectByElementId("columns")); 123 LayoutBlock* columns = toLayoutBlock(getLayoutObjectByElementId("columns"));
124 EXPECT_EQ(columns->layer(), overflowClipObject->paintingLayer()); 124 EXPECT_EQ(columns->layer(), overflowClipObject->paintingLayer());
125 } 125 }
126 126
127 } // namespace blink 127 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698