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

Side by Side Diff: chrome/browser/ui/webui/options/options_browsertest.js

Issue 306993006: Settings: do the same-path check after the main page special-case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to testing doNotTrackConfirm for CrOS. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/options/options_page.js ('k') | 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 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); 5 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"');
6 6
7 /** @const */ var MANAGED_USERS_PREF = 'profile.managed_users'; 7 /** @const */ var MANAGED_USERS_PREF = 'profile.managed_users';
8 8
9 /** 9 /**
10 * Wait for the method specified by |methodName|, on the |object| object, to be 10 * Wait for the method specified by |methodName|, on the |object| object, to be
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // Close the layer-1 overlay. 629 // Close the layer-1 overlay.
630 OptionsPage.closeOverlay(); 630 OptionsPage.closeOverlay();
631 self.verifyOpenPages_(['settings'], ''); 631 self.verifyOpenPages_(['settings'], '');
632 self.verifyHistory_( 632 self.verifyHistory_(
633 ['', 'languages', 'addLanguage', 'languages', ''], 633 ['', 'languages', 'addLanguage', 'languages', ''],
634 testDone); 634 testDone);
635 }); 635 });
636 }); 636 });
637 }); 637 });
638 638
639 // Test that closing an overlay that did not push history when opening does not
640 // again push history.
641 TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayNoHistory', function() {
642 // Open the do not track confirmation prompt.
643 OptionsPage.showPageByName('doNotTrackConfirm', false);
644
645 // Opening the prompt does not add to the history.
646 this.verifyHistory_([''], function() {
647 // Close the overlay.
648 OptionsPage.closeOverlay();
649 // Still no history changes.
650 this.verifyHistory_([''], testDone);
651 }.bind(this));
652 });
653
639 // Make sure an overlay isn't closed (even temporarily) when another overlay is 654 // Make sure an overlay isn't closed (even temporarily) when another overlay is
640 // opened on top. 655 // opened on top.
641 TEST_F('OptionsWebUIExtendedTest', 'OverlayAboveNoReset', function() { 656 TEST_F('OptionsWebUIExtendedTest', 'OverlayAboveNoReset', function() {
642 // Open a layer-1 overlay. 657 // Open a layer-1 overlay.
643 OptionsPage.showPageByName('languages', true); 658 OptionsPage.showPageByName('languages', true);
644 this.verifyOpenPages_(['settings', 'languages']); 659 this.verifyOpenPages_(['settings', 'languages']);
645 660
646 // Open a layer-2 overlay on top. This should not close 'languages'. 661 // Open a layer-2 overlay on top. This should not close 'languages'.
647 this.prohibitChangesToOverlay_(options.LanguageOptions.getInstance()); 662 this.prohibitChangesToOverlay_(options.LanguageOptions.getInstance());
648 OptionsPage.showPageByName('addLanguage', true); 663 OptionsPage.showPageByName('addLanguage', true);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {key: 'value'}]); 775 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {key: 'value'}]);
761 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() { 776 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() {
762 assertFalse($('profiles-supervised-dashboard-tip').hidden); 777 assertFalse($('profiles-supervised-dashboard-tip').hidden);
763 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {}]); 778 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {}]);
764 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() { 779 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() {
765 assertTrue($('profiles-supervised-dashboard-tip').hidden); 780 assertTrue($('profiles-supervised-dashboard-tip').hidden);
766 testDone(); 781 testDone();
767 }); 782 });
768 }); 783 });
769 }); 784 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/options_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698