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

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

Issue 2360833002: Only anchor along the block layout axis. (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 | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | 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 scrollToOrigin = function() { 326 var scrollToTop = function() {
327 // Reset both top and left to avoid a scroll anchoring adjustment when the
328 // #dev-controls element is inserted (crbug.com/646977).
329 document.body.scrollTop = 0; 327 document.body.scrollTop = 0;
330 document.body.scrollLeft = 0;
331 this.nextStep(); 328 this.nextStep();
332 }; 329 };
333 // Test that a) autoscroll works on first page load and b) updating the 330 // Test that a) autoscroll works on first page load and b) updating the
334 // page doesn't result in autoscroll triggering again. 331 // page doesn't result in autoscroll triggering again.
335 this.steps = [this.waitForPageLoad, 332 this.steps = [this.waitForPageLoad,
336 checkHasScrollbar, 333 checkHasScrollbar,
337 checkIsScrolled, 334 checkIsScrolled,
338 scrollToOrigin, 335 scrollToTop,
339 this.enableDeveloperMode, 336 this.enableDeveloperMode,
340 checkScrolledToTop, 337 checkScrolledToTop,
341 testDone]; 338 testDone];
342 this.nextStep(); 339 this.nextStep();
343 }); 340 });
344 341
345 function ErrorConsoleExtensionSettingsWebUITest() {} 342 function ErrorConsoleExtensionSettingsWebUITest() {}
346 343
347 ErrorConsoleExtensionSettingsWebUITest.prototype = { 344 ErrorConsoleExtensionSettingsWebUITest.prototype = {
348 __proto__: ExtensionSettingsWebUITest.prototype, 345 __proto__: ExtensionSettingsWebUITest.prototype,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 512
516 /** @override */ 513 /** @override */
517 browsePreload: ExtensionSettingsWebUITest.prototype.browsePreload + 514 browsePreload: ExtensionSettingsWebUITest.prototype.browsePreload +
518 '?options=' + GOOD_EXTENSION_ID, 515 '?options=' + GOOD_EXTENSION_ID,
519 }; 516 };
520 517
521 TEST_F('OptionsDialogExtensionSettingsWebUITest', 'testAccessibility', 518 TEST_F('OptionsDialogExtensionSettingsWebUITest', 'testAccessibility',
522 function() { 519 function() {
523 this.emptyTestForAccessibility(); 520 this.emptyTestForAccessibility();
524 }); 521 });
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698