Index: chrome/test/data/webui/md_history/history_drawer_test.js |
diff --git a/chrome/test/data/webui/md_history/history_drawer_test.js b/chrome/test/data/webui/md_history/history_drawer_test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6a5782f228f7e72b11e15a464c5ba82a16ebe58d |
--- /dev/null |
+++ b/chrome/test/data/webui/md_history/history_drawer_test.js |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+cr.define('md_history.history_drawer_test', function () { |
+ function registerTests() { |
+ suite('drawer-test', function() { |
+ var app; |
+ var menuButton; |
+ |
+ suiteSetup(function() { |
+ app = $('history-app'); |
+ menuButton = app.$.toolbar.$['main-toolbar'].$.menuButton; |
+ }); |
+ |
+ test('drawer has correct selection', function() { |
+ 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.
|
+ app.hasDrawer_ = true; |
+ return flush().then(function() { |
+ var drawer = app.$$('#drawer'); |
+ var drawerSideBar = app.$$('#drawer-side-bar'); |
+ |
+ assertTrue(!!drawer); |
+ assertTrue(!!drawerSideBar); |
+ MockInteractions.tap(menuButton); |
+ assertTrue(drawer.opened); |
+ |
+ assertEquals('syncedTabs', drawerSideBar.$.menu.selected); |
+ }); |
+ }); |
+ }); |
+ } |
+ |
+ return { |
+ registerTests: registerTests |
+ }; |
+}); |