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

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

Issue 2869803003: Change from ClientRect to DOMRect.
Patch Set: Change from ClientRect to DOMRect. Created 3 years, 6 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/ClientRect.h"
6 #include "core/dom/Document.h" 5 #include "core/dom/Document.h"
7 #include "core/dom/FrameRequestCallback.h" 6 #include "core/dom/FrameRequestCallback.h"
7 #include "core/geometry/DOMRect.h"
8 #include "core/html/HTMLIFrameElement.h" 8 #include "core/html/HTMLIFrameElement.h"
9 #include "core/layout/api/LayoutViewItem.h" 9 #include "core/layout/api/LayoutViewItem.h"
10 #include "core/paint/PaintLayer.h" 10 #include "core/paint/PaintLayer.h"
11 #include "core/testing/sim/SimCompositor.h" 11 #include "core/testing/sim/SimCompositor.h"
12 #include "core/testing/sim/SimDisplayItemList.h" 12 #include "core/testing/sim/SimDisplayItemList.h"
13 #include "core/testing/sim/SimRequest.h" 13 #include "core/testing/sim/SimRequest.h"
14 #include "core/testing/sim/SimTest.h" 14 #include "core/testing/sim/SimTest.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace blink { 17 namespace blink {
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 " link.href = 'import.css';" 404 " link.href = 'import.css';"
405 " document.head.appendChild(link);" 405 " document.head.appendChild(link);"
406 " </script>"); 406 " </script>");
407 import_resource.Start(); 407 import_resource.Start();
408 408
409 // Import loader isn't finish, shoudn't paint. 409 // Import loader isn't finish, shoudn't paint.
410 EXPECT_FALSE(GetDocument().IsRenderingReady()); 410 EXPECT_FALSE(GetDocument().IsRenderingReady());
411 411
412 // If ignoringPendingStylesheets==true, element should get non-empty rect. 412 // If ignoringPendingStylesheets==true, element should get non-empty rect.
413 Element* element = GetDocument().getElementById("test"); 413 Element* element = GetDocument().getElementById("test");
414 ClientRect* rect = element->getBoundingClientRect(); 414 DOMRect* rect = element->getBoundingClientRect();
415 EXPECT_TRUE(rect->width() > 0.f); 415 EXPECT_TRUE(rect->width() > 0.f);
416 EXPECT_TRUE(rect->height() > 0.f); 416 EXPECT_TRUE(rect->height() > 0.f);
417 417
418 // After reset ignoringPendingStylesheets, we should block rendering again. 418 // After reset ignoringPendingStylesheets, we should block rendering again.
419 EXPECT_FALSE(GetDocument().IsRenderingReady()); 419 EXPECT_FALSE(GetDocument().IsRenderingReady());
420 420
421 import_resource.Write("div { color: red; }"); 421 import_resource.Write("div { color: red; }");
422 import_resource.Finish(); 422 import_resource.Finish();
423 main_resource.Finish(); 423 main_resource.Finish();
424 } 424 }
425 425
426 } // namespace blink 426 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp ('k') | third_party/WebKit/Source/web/tests/RootScrollerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698