Commit 101eea61 authored by skobes's avatar skobes Committed by Commit bot

Workaround for scroll anchoring issue with AutoScrollExtensionSettingsWebUITest.

BUG=646977

Review-Url: https://codereview.chromium.org/2343683002
Cr-Commit-Position: refs/heads/master@{#418680}
parent b214d02f
...@@ -323,8 +323,11 @@ TEST_F('AutoScrollExtensionSettingsWebUITest', 'testAutoScroll', function() { ...@@ -323,8 +323,11 @@ TEST_F('AutoScrollExtensionSettingsWebUITest', 'testAutoScroll', function() {
assertEquals(0, document.body.scrollTop); assertEquals(0, document.body.scrollTop);
this.nextStep(); this.nextStep();
}; };
var scrollToTop = function() { var scrollToOrigin = function() {
// Reset both top and left to avoid a scroll anchoring adjustment when the
// #dev-controls element is inserted (crbug.com/646977).
document.body.scrollTop = 0; document.body.scrollTop = 0;
document.body.scrollLeft = 0;
this.nextStep(); this.nextStep();
}; };
// Test that a) autoscroll works on first page load and b) updating the // Test that a) autoscroll works on first page load and b) updating the
...@@ -332,7 +335,7 @@ TEST_F('AutoScrollExtensionSettingsWebUITest', 'testAutoScroll', function() { ...@@ -332,7 +335,7 @@ TEST_F('AutoScrollExtensionSettingsWebUITest', 'testAutoScroll', function() {
this.steps = [this.waitForPageLoad, this.steps = [this.waitForPageLoad,
checkHasScrollbar, checkHasScrollbar,
checkIsScrolled, checkIsScrolled,
scrollToTop, scrollToOrigin,
this.enableDeveloperMode, this.enableDeveloperMode,
checkScrolledToTop, checkScrolledToTop,
testDone]; testDone];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment