| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 var getCards = function() { | 39 var getCards = function() { |
| 40 return Polymer.dom(element.root). | 40 return Polymer.dom(element.root). |
| 41 querySelectorAll('history-synced-device-card'); | 41 querySelectorAll('history-synced-device-card'); |
| 42 } | 42 } |
| 43 | 43 |
| 44 suiteSetup(function() { | 44 suiteSetup(function() { |
| 45 app = $('history-app'); | 45 app = $('history-app'); |
| 46 // Not rendered until selected. | 46 // Not rendered until selected. |
| 47 assertEquals(null, app.$$('#synced-devices')); | 47 assertEquals(null, app.$$('#synced-devices')); |
| 48 | 48 |
| 49 app.selectedPage_ = 'synced-devices'; | 49 app.selectedPage_ = 'syncedTabs'; |
| 50 assertEquals('synced-devices', app.$['side-bar'].$.menu.selected); | 50 assertEquals('syncedTabs', app.$['side-bar'].$.menu.selected); |
| 51 return flush().then(function() { | 51 return flush().then(function() { |
| 52 element = app.$$('#synced-devices'); | 52 element = app.$$('#synced-devices'); |
| 53 assertTrue(!!element); | 53 assertTrue(!!element); |
| 54 }); | 54 }); |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 test('single card, single window', function() { | 57 test('single card, single window', function() { |
| 58 var sessionList = [ | 58 var sessionList = [ |
| 59 createSession( | 59 createSession( |
| 60 'Nexus 5', | 60 'Nexus 5', |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 teardown(function() { | 256 teardown(function() { |
| 257 element.syncedDevices = []; | 257 element.syncedDevices = []; |
| 258 element.searchedTerm = ''; | 258 element.searchedTerm = ''; |
| 259 }); | 259 }); |
| 260 }); | 260 }); |
| 261 } | 261 } |
| 262 return { | 262 return { |
| 263 registerTests: registerTests | 263 registerTests: registerTests |
| 264 }; | 264 }; |
| 265 }); | 265 }); |
| OLD | NEW |