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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html

Issue 1424593002: Update layout tests to use internals.visualViewport APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo delete test that depends on "inert-visual-viewport" flag Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html b/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
index e0490303173ced05a480f339b15ab0f5340c8291..92d4b88247ac6ab46cb0db36a28207f0b382ba26 100644
--- a/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
+++ b/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
@@ -15,27 +15,26 @@
<script>
(function() {
- if (!window.testRunner) {
- debug("This test only works in the test runner.");
+ if (!window.testRunner || !window.internals) {
+ debug("This test only works in the test runner and requires window.internals.");
return;
}
// Force a layout.
document.body.offsetLeft;
- if (window.internals)
- window.internals.setPageScaleFactor(2);
+ window.internals.setPageScaleFactor(2);
// Note that with ScrollTopLeftInterop enabled, document.scrollingElement is
// null because document.body is potentially scrollable (with overflow:hidden
// the box can still be scrolled programmatically).
- shouldBe("window.scrollY", "0");
+ shouldBe("internals.visualViewportScrollY()", "0");
if (window.eventSender) {
eventSender.mouseMoveTo(100, 100);
eventSender.mouseScrollBy(0, -5);
}
- shouldBe("window.scrollY", "200");
+ shouldBe("internals.visualViewportScrollY()", "200");
})();
</script>

Powered by Google App Engine
This is Rietveld 408576698