| 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_metrics_test', function() { | 5 cr.define('md_history.history_metrics_test', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {md_history.BrowserService} | 8 * @extends {md_history.BrowserService} |
| 9 */ | 9 */ |
| 10 var TestMetricsBrowserService = function() { | 10 var TestMetricsBrowserService = function() { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 [createWindow(['http://www.google.com', 'http://example.com'])] | 168 [createWindow(['http://www.google.com', 'http://example.com'])] |
| 169 ), | 169 ), |
| 170 createSession( | 170 createSession( |
| 171 'Nexus 6', | 171 'Nexus 6', |
| 172 [ | 172 [ |
| 173 createWindow(['http://test.com']), | 173 createWindow(['http://test.com']), |
| 174 createWindow(['http://www.gmail.com', 'http://badssl.com']) | 174 createWindow(['http://www.gmail.com', 'http://badssl.com']) |
| 175 ] | 175 ] |
| 176 ), | 176 ), |
| 177 ]; | 177 ]; |
| 178 setForeignSessions(sessionList, true); | 178 setForeignSessions(sessionList); |
| 179 return PolymerTest.flushTasks(); | 179 return PolymerTest.flushTasks(); |
| 180 }).then(() => { | 180 }).then(() => { |
| 181 assertEquals(1, histogram[SyncedTabsHistogram.HAS_FOREIGN_DATA]); | 181 assertEquals(1, histogram[SyncedTabsHistogram.HAS_FOREIGN_DATA]); |
| 182 return PolymerTest.flushTasks(); | 182 return PolymerTest.flushTasks(); |
| 183 }).then(() => { | 183 }).then(() => { |
| 184 cards = polymerSelectAll( | 184 cards = polymerSelectAll( |
| 185 app.$$('#synced-devices'), 'history-synced-device-card'); | 185 app.$$('#synced-devices'), 'history-synced-device-card'); |
| 186 MockInteractions.tap(cards[0].$['card-heading']); | 186 MockInteractions.tap(cards[0].$['card-heading']); |
| 187 assertEquals(1, histogram[SyncedTabsHistogram.COLLAPSE_SESSION]); | 187 assertEquals(1, histogram[SyncedTabsHistogram.COLLAPSE_SESSION]); |
| 188 MockInteractions.tap(cards[0].$['card-heading']); | 188 MockInteractions.tap(cards[0].$['card-heading']); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 200 app.$$('#synced-devices').$$('#menuDeleteButton')); | 200 app.$$('#synced-devices').$$('#menuDeleteButton')); |
| 201 assertEquals(1, histogram[SyncedTabsHistogram.HIDE_FOR_NOW]); | 201 assertEquals(1, histogram[SyncedTabsHistogram.HIDE_FOR_NOW]); |
| 202 }); | 202 }); |
| 203 }); | 203 }); |
| 204 }); | 204 }); |
| 205 } | 205 } |
| 206 return { | 206 return { |
| 207 registerTests: registerTests | 207 registerTests: registerTests |
| 208 }; | 208 }; |
| 209 }); | 209 }); |
| OLD | NEW |