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

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

Issue 1662483002: Introduce RenderingTest::getLayoutObjectByElementId(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThreadTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/layout/LayoutBox.h" 5 #include "core/layout/LayoutBox.h"
6 6
7 #include "core/html/HTMLElement.h" 7 #include "core/html/HTMLElement.h"
8 #include "core/layout/ImageQualityController.h" 8 #include "core/layout/ImageQualityController.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LayoutBoxTest : public RenderingTest { 14 class LayoutBoxTest : public RenderingTest {
15 }; 15 };
16 16
17 TEST_F(LayoutBoxTest, BackgroundObscuredInRect) 17 TEST_F(LayoutBoxTest, BackgroundObscuredInRect)
18 { 18 {
19 setBodyInnerHTML("<style>.column { width: 295.4px; padding-left: 10.4px; } . white-background { background: red; position: relative; overflow: hidden; border -radius: 1px; }" 19 setBodyInnerHTML("<style>.column { width: 295.4px; padding-left: 10.4px; } . white-background { background: red; position: relative; overflow: hidden; border -radius: 1px; }"
20 ".black-background { height: 100px; background: black; color: white; } < /style>" 20 ".black-background { height: 100px; background: black; color: white; } < /style>"
21 "<div class='column'> <div> <div id='target' class='white-background'> < div class='black-background'></div> </div> </div> </div>"); 21 "<div class='column'> <div> <div id='target' class='white-background'> < div class='black-background'></div> </div> </div> </div>");
22 Element* element = document().getElementById("target"); 22 LayoutObject* layoutObject = getLayoutObjectByElementId("target");
23 ASSERT_TRUE(element); 23 ASSERT_TRUE(layoutObject);
24 ASSERT_TRUE(element->layoutObject()); 24 ASSERT_TRUE(layoutObject->boxDecorationBackgroundIsKnownToBeObscured());
25 ASSERT_TRUE(element->layoutObject()->boxDecorationBackgroundIsKnownToBeObscu red());
26 } 25 }
27 26
28 } // namespace blink 27 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThreadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698