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

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

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 cr.define('device_page_tests', function() { 5 cr.define('device_page_tests', function() {
6 /** @enum {string} */ 6 /** @enum {string} */
7 var TestNames = { 7 var TestNames = {
8 DevicePage: 'device page', 8 DevicePage: 'device page',
9 Display: 'display', 9 Display: 'display',
10 Keyboard: 'keyboard', 10 Keyboard: 'keyboard',
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Wait for the initial call to getInfo. 427 // Wait for the initial call to getInfo.
428 fakeSystemDisplay.getInfoCalled.promise, 428 fakeSystemDisplay.getInfoCalled.promise,
429 ]).then(function() { 429 ]).then(function() {
430 // Add a display. 430 // Add a display.
431 addDisplay(1); 431 addDisplay(1);
432 fakeSystemDisplay.onDisplayChanged.callListeners(); 432 fakeSystemDisplay.onDisplayChanged.callListeners();
433 433
434 return Promise.all([ 434 return Promise.all([
435 fakeSystemDisplay.getInfoCalled.promise, 435 fakeSystemDisplay.getInfoCalled.promise,
436 fakeSystemDisplay.getLayoutCalled.promise, 436 fakeSystemDisplay.getLayoutCalled.promise,
437 new Promise(function(resolve, reject) { setTimeout(resolve); })
438 ]); 437 ]);
439 }).then(function() { 438 }).then(function() {
440 // There should be a single display which should be primary and 439 // There should be a single display which should be primary and
441 // selected. Mirroring should be disabled. 440 // selected. Mirroring should be disabled.
442 expectEquals(1, displayPage.displays.length); 441 expectEquals(1, displayPage.displays.length);
443 expectEquals( 442 expectEquals(
444 displayPage.displays[0].id, displayPage.selectedDisplay.id); 443 displayPage.displays[0].id, displayPage.selectedDisplay.id);
445 expectEquals( 444 expectEquals(
446 displayPage.displays[0].id, displayPage.primaryDisplayId); 445 displayPage.displays[0].id, displayPage.primaryDisplayId);
447 expectFalse(displayPage.showMirror_(displayPage.displays)); 446 expectFalse(displayPage.showMirror_(displayPage.displays));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 expectTrue(displayPage.showMirror_(displayPage.displays)); 512 expectTrue(displayPage.showMirror_(displayPage.displays));
514 expectTrue(displayPage.isMirrored_(displayPage.displays)); 513 expectTrue(displayPage.isMirrored_(displayPage.displays));
515 }); 514 });
516 }); 515 });
517 }); 516 });
518 517
519 return { 518 return {
520 TestNames: TestNames 519 TestNames: TestNames
521 }; 520 };
522 }); 521 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698