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

Unified Diff: LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html

Issue 878573004: Increase reliablity of scorllingcoordinator layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test expectation Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
diff --git a/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html b/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
index 6c44498651611f4e1b688dca3eab5466480227cb..7d060ad1dcc9db5d8fe0ae68ab2139c7bf596956 100644
--- a/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
+++ b/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
@@ -1,10 +1,36 @@
<!DOCTYPE html>
-<html>
-<head>
+<style>
+ iframe {
+ position: absolute;
+ left: 200px;
+ top: 200px;
+ height: 120px;
+ width: 120px;
+ padding: 10px;
+ border: none;
+ transform: scale(2);
+ }
+</style>
+
+<iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px; height:1000px;'><p style='font-size: 6px'>Should be covered by a green overlay.</p></body></html>"></iframe>
+<div id="console"></div>
+
+<script src="../resources/js-test.js"></script>
<script src="resources/non-fast-scrollable-region-testing.js"></script>
-</head>
-<body onload="runNonFastScrollableRegionTest();">
-<iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px;height:1000px;'></body></html>" style="position:absolute;left:200px;top:150px;width;150px;height:200px;transform:scale(2);padding:10px;"></iframe>
-</body>
-</html>
+<script>
+ window.jsTestIsAsync = true;
+ description('This test ensures non-fast scrollable areas are calculated ' +
+ 'correctly when a CSS scale transformation is applied.');
+
+ onload = function() {
+ awaitCompsitingUpdate(function(){
+ nonFastScrollableRects = window.internals.nonFastScrollableRects(document);
+ shouldBe('nonFastScrollableRects.length', '1');
+ shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[150, 150, 240, 240]');
+
+ drawNonFastScrollableRegionOverlays();
+ finishJSTest();
+ });
+ };
+</script>

Powered by Google App Engine
This is Rietveld 408576698