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

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

Issue 2627383002: MD History: Replace app-drawer with cr-drawer (Closed)
Patch Set: Use correct close function Created 3 years, 11 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
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.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 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 suite('drawer-test', function() { 5 suite('drawer-test', function() {
6 var app; 6 var app;
7 7
8 suiteSetup(function() { 8 suiteSetup(function() {
9 app = $('history-app'); 9 app = $('history-app');
10 }); 10 });
11 11
12 test('drawer has correct selection', function() { 12 test('drawer has correct selection', function() {
13 app.selectedPage_ = 'syncedTabs'; 13 app.selectedPage_ = 'syncedTabs';
14 app.hasDrawer_ = true; 14 app.hasDrawer_ = true;
15 return PolymerTest.flushTasks().then(function() { 15 return PolymerTest.flushTasks().then(function() {
16 var drawer = app.$$('#drawer'); 16 var drawer = /** @type {CrLazyRenderElement} */ (app.$.drawer);
17 var drawerSideBar = app.$$('#drawer-side-bar'); 17 var drawerSideBar = app.$$('#drawer-side-bar');
18 18
19 assertTrue(!!drawer); 19 assertTrue(!!drawer);
20 assertTrue(!!drawerSideBar); 20 // Drawer side bar doesn't exist until the first time the drawer is
21 // opened.
22 assertFalse(!!drawerSideBar);
21 23
22 var menuButton = app.$.toolbar.$['main-toolbar'].$$('#menuButton'); 24 var menuButton = app.$.toolbar.$['main-toolbar'].$$('#menuButton');
23 assertTrue(!!menuButton); 25 assertTrue(!!menuButton);
24 26
25 MockInteractions.tap(menuButton); 27 MockInteractions.tap(menuButton);
26 assertTrue(drawer.opened); 28 assertTrue(drawer.getIfExists().open);
29 drawerSideBar = app.$$('#drawer-side-bar');
30 assertTrue(!!drawerSideBar);
27 31
28 assertEquals('syncedTabs', drawerSideBar.$.menu.selected); 32 assertEquals('syncedTabs', drawerSideBar.$.menu.selected);
29 }); 33 });
30 }); 34 });
31 }); 35 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698