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> |