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

Side by Side Diff: chrome/test/data/webui/settings/languages_page_browsertest.js

Issue 2690263002: MD Settings: add empty list message for spell-check edit page. (Closed)
Patch Set: fix 80 col Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** @fileoverview Suite of tests for settings-languages-page. */ 5 /** @fileoverview Suite of tests for settings-languages-page. */
6 6
7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 // Polymer BrowserTest fixture. 10 // Polymer BrowserTest fixture.
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 0, triggerRow.querySelector('.secondary').textContent.length); 442 0, triggerRow.querySelector('.secondary').textContent.length);
443 443
444 languagesPage.set( 444 languagesPage.set(
445 'languages.enabled.0.language.supportsSpellcheck', true); 445 'languages.enabled.0.language.supportsSpellcheck', true);
446 languagesPage.set('languages.enabled.0.spellCheckEnabled', true); 446 languagesPage.set('languages.enabled.0.spellCheckEnabled', true);
447 assertTrue(triggerRow.classList.contains('two-line')); 447 assertTrue(triggerRow.classList.contains('two-line'));
448 assertLT( 448 assertLT(
449 0, triggerRow.querySelector('.secondary').textContent.length); 449 0, triggerRow.querySelector('.secondary').textContent.length);
450 } 450 }
451 }); 451 });
452
453 if (!cr.isMac) {
scottchen 2017/02/15 19:34:46 This is being moved to the spellcheck-specific tes
454 test('spellcheck edit dictionary page add word validation', function() {
455 assertFalse(!!languagesPage.$$('settings-edit-dictionary-page'));
456 var spellCheckCollapse = languagesPage.$.spellCheckCollapse;
457 MockInteractions.tap(
458 spellCheckCollapse.querySelector('.list-button'));
459 var editDictPage = languagesPage.$$('settings-edit-dictionary-page');
460 assertTrue(!!editDictPage);
461 var addWordButton = editDictPage.root.querySelector('paper-button');
462 editDictPage.$.newWord.value = '';
463 assertTrue(!!addWordButton);
464 assertTrue(addWordButton.disabled);
465 editDictPage.$.newWord.value = 'valid word';
466 assertFalse(addWordButton.disabled);
467 });
468 }
469 }.bind(this)); 452 }.bind(this));
470 453
471 // TODO(michaelpg): Test more aspects of the languages UI. 454 // TODO(michaelpg): Test more aspects of the languages UI.
472 455
473 // Run all registered tests. 456 // Run all registered tests.
474 mocha.run(); 457 mocha.run();
475 }); 458 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698