| 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 var ROOT_PATH = '../../../../../'; | 5 var ROOT_PATH = '../../../../../'; |
| 6 | 6 |
| 7 GEN_INCLUDE( | 7 GEN_INCLUDE( |
| 8 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); | 8 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } else { | 121 } else { |
| 122 destinationSearch.handleOnDestinationSelect_(dest); | 122 destinationSearch.handleOnDestinationSelect_(dest); |
| 123 } | 123 } |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 setup(function() { | 126 setup(function() { |
| 127 nativeLayer_ = new print_preview.NativeLayerStub(); | 127 nativeLayer_ = new print_preview.NativeLayerStub(); |
| 128 invitationStore_ = new print_preview.InvitationStore(); | 128 invitationStore_ = new print_preview.InvitationStore(); |
| 129 destinationStore_ = new print_preview.DestinationStore( | 129 destinationStore_ = new print_preview.DestinationStore( |
| 130 nativeLayer_, new print_preview.UserInfo(), | 130 nativeLayer_, new print_preview.UserInfo(), |
| 131 new print_preview.AppState()); | 131 new print_preview.AppState(), new WebUIListenerTracker()); |
| 132 userInfo_ = new print_preview.UserInfo(); | 132 userInfo_ = new print_preview.UserInfo(); |
| 133 | 133 |
| 134 destinationSearch_ = new print_preview.DestinationSearch( | 134 destinationSearch_ = new print_preview.DestinationSearch( |
| 135 destinationStore_, invitationStore_, userInfo_); | 135 destinationStore_, invitationStore_, userInfo_); |
| 136 destinationSearch_.decorate($('destination-search')); | 136 destinationSearch_.decorate($('destination-search')); |
| 137 }); | 137 }); |
| 138 | 138 |
| 139 test('ResolutionFails', function() { | 139 test('ResolutionFails', function() { |
| 140 var destId = "001122DEADBEEF"; | 140 var destId = "001122DEADBEEF"; |
| 141 if (cr.isChromeOS) { | 141 if (cr.isChromeOS) { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // Simulate a click. | 218 // Simulate a click. |
| 219 dest.onActivate_(); | 219 dest.onActivate_(); |
| 220 | 220 |
| 221 // Verify that the destination has been selected. | 221 // Verify that the destination has been selected. |
| 222 assertEquals(printerId, destinationStore_.selectedDestination.id); | 222 assertEquals(printerId, destinationStore_.selectedDestination.id); |
| 223 }); | 223 }); |
| 224 }); | 224 }); |
| 225 | 225 |
| 226 mocha.run(); | 226 mocha.run(); |
| 227 }); | 227 }); |
| OLD | NEW |