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

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

Issue 2068613002: [MD History] Add URL parameter for search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@routing
Patch Set: remove_var 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
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_synced_tabs_test', function() { 5 cr.define('md_history.history_synced_tabs_test', function() {
6 function createSession(name, windows) { 6 function createSession(name, windows) {
7 return { 7 return {
8 collapsed: false, 8 collapsed: false,
9 deviceType: '', 9 deviceType: '',
10 name: name, 10 name: name,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ]; 155 ];
156 setForeignSessions(sessionList, true); 156 setForeignSessions(sessionList, true);
157 157
158 return flush().then(function() { 158 return flush().then(function() {
159 var cards = getCards(); 159 var cards = getCards();
160 assertEquals(2, cards.length); 160 assertEquals(2, cards.length);
161 161
162 // Ensure separators between windows are added appropriately. 162 // Ensure separators between windows are added appropriately.
163 assertEquals(1, numWindowSeparators(cards[0])); 163 assertEquals(1, numWindowSeparators(cards[0]));
164 assertEquals(3, numWindowSeparators(cards[1])); 164 assertEquals(3, numWindowSeparators(cards[1]));
165 element.searchedTerm = 'g'; 165 element.searchTerm = 'g';
166 166
167 return flush(); 167 return flush();
168 }).then(function() { 168 }).then(function() {
169 var cards = getCards(); 169 var cards = getCards();
170 170
171 assertEquals(1, numWindowSeparators(cards[0])); 171 assertEquals(1, numWindowSeparators(cards[0]));
172 assertEquals(1, cards[0].tabs.length); 172 assertEquals(1, cards[0].tabs.length);
173 assertEquals('http://www.google.com', cards[0].tabs[0].title); 173 assertEquals('http://www.google.com', cards[0].tabs[0].title);
174 assertEquals(2, numWindowSeparators(cards[1])); 174 assertEquals(2, numWindowSeparators(cards[1]));
175 assertEquals(3, cards[1].tabs.length); 175 assertEquals(3, cards[1].tabs.length);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 updateSignInState(false); 248 updateSignInState(false);
249 return flush(); 249 return flush();
250 }).then(function() { 250 }).then(function() {
251 // When user signs out, don't show the message. 251 // When user signs out, don't show the message.
252 assertTrue(element.$['no-synced-tabs'].hidden); 252 assertTrue(element.$['no-synced-tabs'].hidden);
253 }); 253 });
254 }); 254 });
255 255
256 teardown(function() { 256 teardown(function() {
257 element.syncedDevices = []; 257 element.syncedDevices = [];
258 element.searchedTerm = ''; 258 element.searchTerm = '';
259 }); 259 });
260 }); 260 });
261 } 261 }
262 return { 262 return {
263 registerTests: registerTests 263 registerTests: registerTests
264 }; 264 };
265 }); 265 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/history_routing_test.js ('k') | chrome/test/data/webui/md_history/md_history_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698