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

Unified Diff: chrome/test/data/webui/md_history/history_routing_test.js

Issue 2042973002: [MD History] Add routing to the synced devices page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_search_bar
Patch Set: rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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..e8aa984451d5bdb2515d84a25b6b72e2c673e86f
--- /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('routing-test', function() {
+ var app;
+ var list;
+
+ suiteSetup(function() {
+ app = $('history-app');
+ sidebar = app.$['side-bar']
+ });
+
+ test('changing route changes active view', function() {
+ assertEquals('history', app.$.content.selected);
+ app.set('routeData_.page', 'syncedTabs');
+ return flush().then(function() {
+ assertEquals('syncedTabs', app.$.content.selected);
+ assertEquals('chrome://history/syncedTabs', window.location.href);
+ });
+ });
+
+ test('route updates from sidebar', function() {
+ var menu = sidebar.$.menu;
+ assertEquals('', app.routeData_.page);
+ assertEquals('chrome://history/', window.location.href);
+
+ MockInteractions.tap(menu.children[1]);
+ assertEquals('syncedTabs', app.routeData_.page);
+ assertEquals('chrome://history/syncedTabs', window.location.href);
+
+ MockInteractions.tap(menu.children[0]);
+ assertEquals('', app.routeData_.page);
+ assertEquals('chrome://history/', window.location.href);
+ });
+
+ teardown(function() {
+ app.set('routeData_.page', '');
+ });
+ });
+ }
+ return {
+ registerTests: registerTests
+ };
+});
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.js ('k') | chrome/test/data/webui/md_history/history_synced_tabs_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698