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

Side by Side 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 unified diff | Download patch
OLDNEW
(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_routing_test', function() {
6 function registerTests() {
7 suite('routing-test', function() {
8 var app;
9 var list;
10
11 suiteSetup(function() {
12 app = $('history-app');
13 sidebar = app.$['side-bar']
14 });
15
16 test('changing route changes active view', function() {
17 assertEquals('history', app.$.content.selected);
18 app.set('routeData_.page', 'syncedTabs');
19 return flush().then(function() {
20 assertEquals('syncedTabs', app.$.content.selected);
21 assertEquals('chrome://history/syncedTabs', window.location.href);
22 });
23 });
24
25 test('route updates from sidebar', function() {
26 var menu = sidebar.$.menu;
27 assertEquals('', app.routeData_.page);
28 assertEquals('chrome://history/', window.location.href);
29
30 MockInteractions.tap(menu.children[1]);
31 assertEquals('syncedTabs', app.routeData_.page);
32 assertEquals('chrome://history/syncedTabs', window.location.href);
33
34 MockInteractions.tap(menu.children[0]);
35 assertEquals('', app.routeData_.page);
36 assertEquals('chrome://history/', window.location.href);
37 });
38
39 teardown(function() {
40 app.set('routeData_.page', '');
41 });
42 });
43 }
44 return {
45 registerTests: registerTests
46 };
47 });
OLDNEW
« 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