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

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: 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 profile delete prompt.
643 ManageProfileOverlay.showDeleteDialog(BrowserOptions.getCurrentProfile());
644
645 // Opening the prompt does not add to the history.
646 var self = this;
647 this.verifyHistory_([''], function() {
648 // Close the overlay.
649 OptionsPage.closeOverlay();
650 // Still no history changes.
651 self.verifyHistory_([''], testDone);
652 });
Dan Beam 2014/05/30 21:13:17 nit: instead of making |self| this.verifyHistor
davidben 2014/05/30 21:20:36 Done. (Cool, I'm glad that's how we should be doin
653 });
654
639 // Make sure an overlay isn't closed (even temporarily) when another overlay is 655 // Make sure an overlay isn't closed (even temporarily) when another overlay is
640 // opened on top. 656 // opened on top.
641 TEST_F('OptionsWebUIExtendedTest', 'OverlayAboveNoReset', function() { 657 TEST_F('OptionsWebUIExtendedTest', 'OverlayAboveNoReset', function() {
642 // Open a layer-1 overlay. 658 // Open a layer-1 overlay.
643 OptionsPage.showPageByName('languages', true); 659 OptionsPage.showPageByName('languages', true);
644 this.verifyOpenPages_(['settings', 'languages']); 660 this.verifyOpenPages_(['settings', 'languages']);
645 661
646 // Open a layer-2 overlay on top. This should not close 'languages'. 662 // Open a layer-2 overlay on top. This should not close 'languages'.
647 this.prohibitChangesToOverlay_(options.LanguageOptions.getInstance()); 663 this.prohibitChangesToOverlay_(options.LanguageOptions.getInstance());
648 OptionsPage.showPageByName('addLanguage', true); 664 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'}]); 776 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {key: 'value'}]);
761 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() { 777 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() {
762 assertFalse($('profiles-supervised-dashboard-tip').hidden); 778 assertFalse($('profiles-supervised-dashboard-tip').hidden);
763 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {}]); 779 chrome.send('optionsTestSetPref', [MANAGED_USERS_PREF, {}]);
764 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() { 780 waitForResponse(BrowserOptions, 'updateManagesSupervisedUsers', function() {
765 assertTrue($('profiles-supervised-dashboard-tip').hidden); 781 assertTrue($('profiles-supervised-dashboard-tip').hidden);
766 testDone(); 782 testDone();
767 }); 783 });
768 }); 784 });
769 }); 785 });
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