Index: LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html |
diff --git a/LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html b/LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html |
index 8e85e587cbc31ad5d0625c9cd141d59695eb44aa..334f2108ca4221ed4a242d2906af5feb82c7efad 100644 |
--- a/LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html |
+++ b/LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html |
@@ -61,7 +61,7 @@ if (window.internals) { |
window.jsTestIsAsync = true; |
-function shouldIgnore() { |
+function checkThatWeHaveIgnored() { |
if (window.internals) { |
var reasons = internals.mainThreadScrollingReasons(document); |
if (reasons === '') |
@@ -77,10 +77,16 @@ function shouldIgnore() { |
} |
} |
-function shouldNotIgnore() { |
- document.body.style.height = "3000px"; |
+function shouldIgnore() { |
+ checkThatWeHaveIgnored(); |
+ |
+ document.body.style.overflow = "hidden"; |
document.body.offsetTop; |
- |
+ |
+ checkThatWeHaveIgnored(); |
+} |
+ |
+function checkThatWeHaveNotIgnored() { |
if (window.internals) { |
var reasons = internals.mainThreadScrollingReasons(document); |
if (reasons === '') |
@@ -95,6 +101,14 @@ function shouldNotIgnore() { |
} |
} |
+function shouldNotIgnore() { |
+ document.body.style.overflow = ""; |
+ document.body.style.height = "3000px"; |
+ document.body.offsetTop; |
+ |
+ checkThatWeHaveNotIgnored(); |
+} |
+ |
function runTests() { |
shouldIgnore(); |
shouldNotIgnore(); |