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

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

Issue 1156473007: Enables the user to select multiple languages for spellchecking (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some bugs and handled the spelling service. Created 5 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
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(['options_browsertest_base.js']); 5 GEN_INCLUDE(['options_browsertest_base.js']);
6 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); 6 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"');
7 7
8 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users'; 8 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users';
9 9
10 /** 10 /**
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 509
510 // Show the search page with no query string, to fall back to the settings page. 510 // Show the search page with no query string, to fall back to the settings page.
511 // Test disabled because it's flaky. crbug.com/303841 511 // Test disabled because it's flaky. crbug.com/303841
512 TEST_F('OptionsWebUIExtendedTest', 'DISABLED_ShowSearchPageNoQuery', 512 TEST_F('OptionsWebUIExtendedTest', 'DISABLED_ShowSearchPageNoQuery',
513 function() { 513 function() {
514 PageManager.showPageByName('search'); 514 PageManager.showPageByName('search');
515 this.verifyOpenPages_(['settings']); 515 this.verifyOpenPages_(['settings']);
516 this.verifyHistory_(['settings'], testDone); 516 this.verifyHistory_(['settings'], testDone);
517 }); 517 });
518 518
519 // Verify that the option to enable the spelling service is hidden when
520 // multilingual spellchecking is enabled.
521 TEST_F('OptionsWebUIExtendedTest', 'HideSpellingServiceCheckbox',
522 function() {
523 assertTrue(loadTimeData.getBoolean('enableMultilingualSpellChecker'));
524 expectTrue($('spelling-enabled-container').hidden);
525 testDone();
526 });
527
519 // Manipulate the search page via the search field. 528 // Manipulate the search page via the search field.
520 TEST_F('OptionsWebUIExtendedTest', 'ShowSearchFromField', function() { 529 TEST_F('OptionsWebUIExtendedTest', 'ShowSearchFromField', function() {
521 $('search-field').onsearch({currentTarget: {value: 'query'}}); 530 $('search-field').onsearch({currentTarget: {value: 'query'}});
522 this.verifyOpenPages_(['settings', 'search'], 'search#query'); 531 this.verifyOpenPages_(['settings', 'search'], 'search#query');
523 this.verifyHistory_(['', 'search#query'], function() { 532 this.verifyHistory_(['', 'search#query'], function() {
524 $('search-field').onsearch({currentTarget: {value: 'query2'}}); 533 $('search-field').onsearch({currentTarget: {value: 'query2'}});
525 this.verifyOpenPages_(['settings', 'search'], 'search#query2'); 534 this.verifyOpenPages_(['settings', 'search'], 'search#query2');
526 this.verifyHistory_(['', 'search#query', 'search#query2'], function() { 535 this.verifyHistory_(['', 'search#query', 'search#query2'], function() {
527 $('search-field').onsearch({currentTarget: {value: ''}}); 536 $('search-field').onsearch({currentTarget: {value: ''}});
528 this.verifyOpenPages_(['settings'], ''); 537 this.verifyOpenPages_(['settings'], '');
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 __proto__: OptionsWebUIExtendedTest.prototype, 881 __proto__: OptionsWebUIExtendedTest.prototype,
873 882
874 /** @override */ 883 /** @override */
875 browsePreload: 'chrome://settings-frame/nonexistantPage', 884 browsePreload: 'chrome://settings-frame/nonexistantPage',
876 }; 885 };
877 886
878 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { 887 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() {
879 assertEquals('chrome://settings-frame/', document.location.href); 888 assertEquals('chrome://settings-frame/', document.location.href);
880 this.verifyHistory_([''], testDone); 889 this.verifyHistory_([''], testDone);
881 }); 890 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698