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_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; |
11 | 11 |
12 suiteSetup(function() { | 12 suiteSetup(function() { |
13 app = $('history-app'); | 13 app = $('history-app'); |
14 sidebar = app.$['side-bar'] | 14 sidebar = app.$['content-side-bar'] |
15 toolbar = app.$['toolbar']; | 15 toolbar = app.$['toolbar']; |
16 }); | 16 }); |
17 | 17 |
18 test('changing route changes active view', function() { | 18 test('changing route changes active view', function() { |
19 assertEquals('history', app.$.content.selected); | 19 assertEquals('history', app.$.content.selected); |
20 app.set('routeData_.page', 'syncedTabs'); | 20 app.set('routeData_.page', 'syncedTabs'); |
21 return flush().then(function() { | 21 return flush().then(function() { |
22 assertEquals('syncedTabs', app.$.content.selected); | 22 assertEquals('syncedTabs', app.$.content.selected); |
23 assertEquals('chrome://history/syncedTabs', window.location.href); | 23 assertEquals('chrome://history/syncedTabs', window.location.href); |
24 }); | 24 }); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 }); |
OLD | NEW |