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

Side by Side Diff: chrome/test/data/webui/md_history/history_routing_test.js

Issue 2264933002: [MD History] Make sidebar menu respond to spacebar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_presubmit
Patch Set: update_closure Created 4 years, 3 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
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('md_history.history_routing_test', function() { 5 cr.define('md_history.history_routing_test', function() {
6 function registerTests() { 6 function registerTests() {
7 suite('routing-test', function() { 7 suite('routing-test', function() {
8 var app; 8 var app;
9 var list; 9 var list;
10 var toolbar; 10 var toolbar;
(...skipping 15 matching lines...) Expand all
26 26
27 test('route updates from sidebar', function() { 27 test('route updates from sidebar', function() {
28 var menu = sidebar.$.menu; 28 var menu = sidebar.$.menu;
29 assertEquals('', app.routeData_.page); 29 assertEquals('', app.routeData_.page);
30 assertEquals('chrome://history/', window.location.href); 30 assertEquals('chrome://history/', window.location.href);
31 31
32 MockInteractions.tap(menu.children[1]); 32 MockInteractions.tap(menu.children[1]);
33 assertEquals('syncedTabs', app.routeData_.page); 33 assertEquals('syncedTabs', app.routeData_.page);
34 assertEquals('chrome://history/syncedTabs', window.location.href); 34 assertEquals('chrome://history/syncedTabs', window.location.href);
35 35
36 MockInteractions.tap(menu.children[0]); 36 MockInteractions.keyDownOn(menu.children[0], 32, '', "Space");
37 assertEquals('', app.routeData_.page); 37 assertEquals('', app.routeData_.page);
38 assertEquals('chrome://history/', window.location.href); 38 assertEquals('chrome://history/', window.location.href);
39 }); 39 });
40 40
41 test('route updates from search', function() { 41 test('route updates from search', function() {
42 var searchTerm = 'McCree'; 42 var searchTerm = 'McCree';
43 assertEquals('', app.routeData_.page); 43 assertEquals('', app.routeData_.page);
44 toolbar.setSearchTerm(searchTerm); 44 toolbar.setSearchTerm(searchTerm);
45 assertEquals(searchTerm, app.queryParams_.q); 45 assertEquals(searchTerm, app.queryParams_.q);
46 }); 46 });
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 registerMessageCallback('queryHistory', this, verifyFunction); 115 registerMessageCallback('queryHistory', this, verifyFunction);
116 }); 116 });
117 }); 117 });
118 } 118 }
119 return { 119 return {
120 registerTests: registerTests 120 registerTests: registerTests
121 }; 121 };
122 }); 122 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698