Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('md_history.history_drawer_test', function () { | |
| 6 function registerTests() { | |
| 7 suite('drawer-test', function() { | |
| 8 var app; | |
| 9 var menuButton; | |
| 10 | |
| 11 suiteSetup(function() { | |
| 12 app = $('history-app'); | |
| 13 menuButton = app.$.toolbar.$['main-toolbar'].$.menuButton; | |
| 14 }); | |
| 15 | |
| 16 test('drawer has correct selection', function() { | |
| 17 app.selectedPage_ = 'syncedTabs'; | |
|
dpapad
2016/07/29 01:45:58
Accessing private properties is usually a sign tha
tsergeant
2016/07/29 02:47:54
Acknowledged.
| |
| 18 app.hasDrawer_ = true; | |
| 19 return flush().then(function() { | |
| 20 var drawer = app.$$('#drawer'); | |
| 21 var drawerSideBar = app.$$('#drawer-side-bar'); | |
| 22 | |
| 23 assertTrue(!!drawer); | |
| 24 assertTrue(!!drawerSideBar); | |
| 25 MockInteractions.tap(menuButton); | |
| 26 assertTrue(drawer.opened); | |
| 27 | |
| 28 assertEquals('syncedTabs', drawerSideBar.$.menu.selected); | |
| 29 }); | |
| 30 }); | |
| 31 }); | |
| 32 } | |
| 33 | |
| 34 return { | |
| 35 registerTests: registerTests | |
| 36 }; | |
| 37 }); | |
| OLD | NEW |