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

Side by Side Diff: third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp

Issue 2384033002: reflow comments in web/tests (Closed)
Patch Set: . Created 4 years, 2 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 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/dom/Document.h" 5 #include "core/dom/Document.h"
6 #include "core/html/HTMLIFrameElement.h" 6 #include "core/html/HTMLIFrameElement.h"
7 #include "core/layout/api/LayoutViewItem.h" 7 #include "core/layout/api/LayoutViewItem.h"
8 #include "core/paint/PaintLayer.h" 8 #include "core/paint/PaintLayer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "web/tests/sim/SimCompositor.h" 10 #include "web/tests/sim/SimCompositor.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // The child frame still has pending sheets, and the parent frame has no 264 // The child frame still has pending sheets, and the parent frame has no
265 // invalid paint so we shouldn't draw any text. 265 // invalid paint so we shouldn't draw any text.
266 EXPECT_FALSE(frame2.contains(SimCanvas::Text)); 266 EXPECT_FALSE(frame2.contains(SimCanvas::Text));
267 267
268 LayoutViewItem iframeLayoutViewItem = 268 LayoutViewItem iframeLayoutViewItem =
269 childFrame->contentDocument()->layoutViewItem(); 269 childFrame->contentDocument()->layoutViewItem();
270 const DisplayItemList& displayItemList = iframeLayoutViewItem.layer() 270 const DisplayItemList& displayItemList = iframeLayoutViewItem.layer()
271 ->graphicsLayerBacking() 271 ->graphicsLayerBacking()
272 ->getPaintController() 272 ->getPaintController()
273 .getDisplayItemList(); 273 .getDisplayItemList();
274 // Check that the DisplayItemList has no subsequene caching markers. These are not allowed in pending-style-sheets mode 274 // Check that the DisplayItemList has no subsequene caching markers. These are
275 // since otherwise caching would be incorrect. 275 // not allowed in pending-style-sheets mode since otherwise caching would be
276 // incorrect.
276 ASSERT_EQ(2u, displayItemList.size()); 277 ASSERT_EQ(2u, displayItemList.size());
277 EXPECT_EQ(DisplayItem::kDocumentBackground, displayItemList[0].getType()); 278 EXPECT_EQ(DisplayItem::kDocumentBackground, displayItemList[0].getType());
278 EXPECT_EQ(DisplayItem::kBoxDecorationBackground, 279 EXPECT_EQ(DisplayItem::kBoxDecorationBackground,
279 displayItemList[1].getType()); 280 displayItemList[1].getType());
280 281
281 // 1 for the main frame background (white), 282 // 1 for the main frame background (white),
282 // 1 for the iframe background (pink) 283 // 1 for the iframe background (pink)
283 // 1 for the composited transform layer in the iframe (green). 284 // 1 for the composited transform layer in the iframe (green).
284 // TODO(esprehn): Why FOUC the background (borders, etc.) of iframes and 285 // TODO(esprehn): Why FOUC the background (borders, etc.) of iframes and
285 // composited layers? Seems like a bug. 286 // composited layers? Seems like a bug.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // Finish loading the CSS resource (no change to painting). 334 // Finish loading the CSS resource (no change to painting).
334 cssBodyResource.complete("a { color: red; }"); 335 cssBodyResource.complete("a { color: red; }");
335 EXPECT_TRUE(document().isRenderingReady()); 336 EXPECT_TRUE(document().isRenderingReady());
336 337
337 // Finish the load, painting should stay enabled. 338 // Finish the load, painting should stay enabled.
338 mainResource.finish(); 339 mainResource.finish();
339 EXPECT_TRUE(document().isRenderingReady()); 340 EXPECT_TRUE(document().isRenderingReady());
340 } 341 }
341 342
342 } // namespace blink 343 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698