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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.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/scrolling/editor-command-scroll-page-scale.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html b/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
index 5f3fc65275699aa55c9ffaeb8c8dd2bcb0845b64..703c6424e7870e9c3d28661c1b8cddc00a3c761b 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
@@ -26,26 +26,26 @@
function testScroll(forwardCmd, backwardCmd) {
internals.executeCommand(document, forwardCmd, '');
- if (window.scrollY === 0) {
+ if (internals.visualViewportScrollY() === 0) {
debug('FAIL: Command ' + forwardCmd + ' failed to scroll page at all.');
return;
}
- numScrolls = Math.ceil((pageHeight - window.innerHeight) / window.scrollY);
+ numScrolls = Math.ceil((pageHeight - internals.visualViewportHeight()) / internals.visualViewportScrollY());
for(var i = 0; i < numScrolls - 1; ++i) {
internals.executeCommand(document, forwardCmd, '');
}
- shouldBe('window.scrollY', 'pageHeight - window.innerHeight');
- shouldBe('window.scrollX', '0');
+ shouldBe('internals.visualViewportScrollY()', 'pageHeight - internals.visualViewportHeight()');
+ shouldBe('internals.visualViewportScrollX()', '0');
for(var i = 0; i < numScrolls; ++i) {
internals.executeCommand(document, backwardCmd, '');
}
- shouldBe('window.scrollY', '0');
- shouldBe('window.scrollX', '0');
+ shouldBe('internals.visualViewportScrollY()', '0');
+ shouldBe('internals.visualViewportScrollX()', '0');
}
function runTest()

Powered by Google App Engine
This is Rietveld 408576698