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

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

Issue 2643533003: MD History: Use one-way binding for history query state. (Closed)
Patch Set: Remove wrapper function Created 3 years, 11 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 assertEquals('chrome://history/', window.location.href); 48 assertEquals('chrome://history/', window.location.href);
49 var searchTerm = 'Mei'; 49 var searchTerm = 'Mei';
50 assertEquals('history', app.$.content.selected); 50 assertEquals('history', app.$.content.selected);
51 navigateTo('/?q=' + searchTerm); 51 navigateTo('/?q=' + searchTerm);
52 assertEquals(searchTerm, toolbar.searchTerm); 52 assertEquals(searchTerm, toolbar.searchTerm);
53 }); 53 });
54 54
55 test('route updates from search', function() { 55 test('route updates from search', function() {
56 var searchTerm = 'McCree'; 56 var searchTerm = 'McCree';
57 assertEquals('history', app.$.content.selected); 57 assertEquals('history', app.$.content.selected);
58 app.set('queryState_.searchTerm', searchTerm); 58 app.fire('change-query', {search: searchTerm});
59 assertEquals('chrome://history/?q=' + searchTerm, window.location.href); 59 assertEquals('chrome://history/?q=' + searchTerm, window.location.href);
60 }); 60 });
61 61
62 test('search preserved across menu items', function() { 62 test('search preserved across menu items', function() {
63 var searchTerm = 'Soldier76'; 63 var searchTerm = 'Soldier76';
64 var menu = sidebar.$.menu; 64 var menu = sidebar.$.menu;
65 assertEquals('history', app.selectedPage_); 65 assertEquals('history', app.selectedPage_);
66 navigateTo('/?q=' + searchTerm); 66 navigateTo('/?q=' + searchTerm);
67 67
68 MockInteractions.tap(menu.children[1]); 68 MockInteractions.tap(menu.children[1]);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 registerMessageCallback('queryHistory', this, verifyFunction); 121 registerMessageCallback('queryHistory', this, verifyFunction);
122 }); 122 });
123 }); 123 });
124 } 124 }
125 return { 125 return {
126 registerTests: registerTests 126 registerTests: registerTests
127 }; 127 };
128 }); 128 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/history_metrics_test.js ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698