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

Side by Side Diff: chrome/test/data/webui/md_history/history_drawer_test.js

Issue 2237703004: [MD History] Focus the search bar on load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix drawer test 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('md_history.history_drawer_test', function () { 5 cr.define('md_history.history_drawer_test', function () {
6 function registerTests() { 6 function registerTests() {
7 suite('drawer-test', function() { 7 suite('drawer-test', function() {
8 var app; 8 var app;
9 var menuButton; 9 var menuButton;
10 10
11 suiteSetup(function() { 11 suiteSetup(function() {
12 app = $('history-app'); 12 app = $('history-app');
13 menuButton = app.$.toolbar.$['main-toolbar'].$.menuButton; 13 menuButton = app.$.toolbar.$['main-toolbar'].$.menuButton;
14 }); 14 });
15 15
16 test('drawer has correct selection', function() { 16 test('drawer has correct selection', function() {
17 app.selectedPage_ = 'syncedTabs'; 17 app.selectedPage_ = 'syncedTabs';
18 app.hasDrawer_ = true; 18 app.hasDrawer = true;
19 return flush().then(function() { 19 return flush().then(function() {
20 var drawer = app.$$('#drawer'); 20 var drawer = app.$$('#drawer');
21 var drawerSideBar = app.$$('#drawer-side-bar'); 21 var drawerSideBar = app.$$('#drawer-side-bar');
22 22
23 assertTrue(!!drawer); 23 assertTrue(!!drawer);
24 assertTrue(!!drawerSideBar); 24 assertTrue(!!drawerSideBar);
25 MockInteractions.tap(menuButton); 25 MockInteractions.tap(menuButton);
26 assertTrue(drawer.opened); 26 assertTrue(drawer.opened);
27 27
28 assertEquals('syncedTabs', drawerSideBar.$.menu.selected); 28 assertEquals('syncedTabs', drawerSideBar.$.menu.selected);
29 }); 29 });
30 }); 30 });
31 }); 31 });
32 } 32 }
33 33
34 return { 34 return {
35 registerTests: registerTests 35 registerTests: registerTests
36 }; 36 };
37 }); 37 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698