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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.js

Issue 2343683002: Workaround for scroll anchoring issue with AutoScrollExtensionSettingsWebUITest. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(dbeam): test for loading upacked extensions? 5 // TODO(dbeam): test for loading upacked extensions?
6 6
7 GEN('#include "chrome/browser/ui/webui/extensions/' + 7 GEN('#include "chrome/browser/ui/webui/extensions/' +
8 'extension_settings_browsertest.h"'); 8 'extension_settings_browsertest.h"');
9 9
10 // The id of the extension from |InstallGoodExtension|. 10 // The id of the extension from |InstallGoodExtension|.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 this.nextStep(); 316 this.nextStep();
317 }; 317 };
318 var checkIsScrolled = function() { 318 var checkIsScrolled = function() {
319 assertGT(document.body.scrollTop, 0); 319 assertGT(document.body.scrollTop, 0);
320 this.nextStep(); 320 this.nextStep();
321 }; 321 };
322 var checkScrolledToTop = function() { 322 var checkScrolledToTop = function() {
323 assertEquals(0, document.body.scrollTop); 323 assertEquals(0, document.body.scrollTop);
324 this.nextStep(); 324 this.nextStep();
325 }; 325 };
326 var scrollToTop = function() { 326 var scrollToOrigin = function() {
327 // Reset both top and left to avoid a scroll anchoring adjustment when the
328 // #dev-controls element is inserted (crbug.com/646977).
327 document.body.scrollTop = 0; 329 document.body.scrollTop = 0;
330 document.body.scrollLeft = 0;
328 this.nextStep(); 331 this.nextStep();
329 }; 332 };
330 // Test that a) autoscroll works on first page load and b) updating the 333 // Test that a) autoscroll works on first page load and b) updating the
331 // page doesn't result in autoscroll triggering again. 334 // page doesn't result in autoscroll triggering again.
332 this.steps = [this.waitForPageLoad, 335 this.steps = [this.waitForPageLoad,
333 checkHasScrollbar, 336 checkHasScrollbar,
334 checkIsScrolled, 337 checkIsScrolled,
335 scrollToTop, 338 scrollToOrigin,
336 this.enableDeveloperMode, 339 this.enableDeveloperMode,
337 checkScrolledToTop, 340 checkScrolledToTop,
338 testDone]; 341 testDone];
339 this.nextStep(); 342 this.nextStep();
340 }); 343 });
341 344
342 function ErrorConsoleExtensionSettingsWebUITest() {} 345 function ErrorConsoleExtensionSettingsWebUITest() {}
343 346
344 ErrorConsoleExtensionSettingsWebUITest.prototype = { 347 ErrorConsoleExtensionSettingsWebUITest.prototype = {
345 __proto__: ExtensionSettingsWebUITest.prototype, 348 __proto__: ExtensionSettingsWebUITest.prototype,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 515
513 /** @override */ 516 /** @override */
514 browsePreload: ExtensionSettingsWebUITest.prototype.browsePreload + 517 browsePreload: ExtensionSettingsWebUITest.prototype.browsePreload +
515 '?options=' + GOOD_EXTENSION_ID, 518 '?options=' + GOOD_EXTENSION_ID,
516 }; 519 };
517 520
518 TEST_F('OptionsDialogExtensionSettingsWebUITest', 'testAccessibility', 521 TEST_F('OptionsDialogExtensionSettingsWebUITest', 'testAccessibility',
519 function() { 522 function() {
520 this.emptyTestForAccessibility(); 523 this.emptyTestForAccessibility();
521 }); 524 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698