| Index: chrome/test/data/webui/md_history/history_routing_test.js
|
| diff --git a/chrome/test/data/webui/md_history/history_routing_test.js b/chrome/test/data/webui/md_history/history_routing_test.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..31ad95e4450d0bfd14fd98dfe9dab008bca01273
|
| --- /dev/null
|
| +++ b/chrome/test/data/webui/md_history/history_routing_test.js
|
| @@ -0,0 +1,47 @@
|
| +// 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_routing_test', function() {
|
| + function registerTests() {
|
| + suite('synced-tabs', function() {
|
| + var app;
|
| + var list;
|
| +
|
| + suiteSetup(function() {
|
| + app = $('history-app');
|
| + element = app.$['history-list'];
|
| + sidebar = app.$['history-side-bar']
|
| + });
|
| +
|
| + test('changing route changes active view', function() {
|
| + assertEquals('history-list', app.selectedPage);
|
| + app.set('route.path', '/openTabs');
|
| + return flush().then(function() {
|
| + assertEquals('history-synced-device-manager', app.selectedPage);
|
| + });
|
| + });
|
| +
|
| + test('route updates from sidebar', function() {
|
| + var menu = sidebar.$.menu;
|
| + assertEquals('/', app.route.path);
|
| + MockInteractions.tap(menu.children[1]);
|
| +
|
| + return flush().then(function() {
|
| + assertEquals('/openTabs', app.route.path);
|
| + MockInteractions.tap(menu.children[0]);
|
| + return flush();
|
| + }).then(function() {
|
| + assertEquals('/', app.route.path);
|
| + });
|
| + });
|
| +
|
| + teardown(function() {
|
| + app.set('route.path', '/');
|
| + });
|
| + });
|
| + }
|
| + return {
|
| + registerTests: registerTests
|
| + };
|
| +});
|
|
|