OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * Test fixture for print preview WebUI testing. | 6 * Test fixture for print preview WebUI testing. |
7 * @constructor | 7 * @constructor |
8 * @extends {testing.Test} | 8 * @extends {testing.Test} |
9 */ | 9 */ |
10 function PrintPreviewWebUITest() { | 10 function PrintPreviewWebUITest() { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 cr.EventTarget.call(this); | 82 cr.EventTarget.call(this); |
83 } | 83 } |
84 CloudPrintInterfaceStub.prototype = { | 84 CloudPrintInterfaceStub.prototype = { |
85 __proto__: cr.EventTarget.prototype, | 85 __proto__: cr.EventTarget.prototype, |
86 search: function(isRecent) {} | 86 search: function(isRecent) {} |
87 }; | 87 }; |
88 var oldCpInterfaceEventType = cloudprint.CloudPrintInterface.EventType; | 88 var oldCpInterfaceEventType = cloudprint.CloudPrintInterface.EventType; |
89 cloudprint.CloudPrintInterface = CloudPrintInterfaceStub; | 89 cloudprint.CloudPrintInterface = CloudPrintInterfaceStub; |
90 cloudprint.CloudPrintInterface.EventType = oldCpInterfaceEventType; | 90 cloudprint.CloudPrintInterface.EventType = oldCpInterfaceEventType; |
91 | 91 |
92 print_preview.PreviewArea.prototype.getPluginType_ = | 92 print_preview.PreviewArea.prototype.checkPluginCompatibility_ = |
93 function() { | 93 function() { |
94 return print_preview.PreviewArea.PluginType_.NONE; | 94 return false; |
95 }; | 95 }; |
96 }.bind(this)); | 96 }.bind(this)); |
97 }, | 97 }, |
98 | 98 |
99 /** | 99 /** |
100 * Dispatch the INITIAL_SETTINGS_SET event. This call is NOT async and will | 100 * Dispatch the INITIAL_SETTINGS_SET event. This call is NOT async and will |
101 * happen in the same thread. | 101 * happen in the same thread. |
102 */ | 102 */ |
103 setInitialSettings: function() { | 103 setInitialSettings: function() { |
104 var initialSettingsSetEvent = | 104 var initialSettingsSetEvent = |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 expectEquals( | 953 expectEquals( |
954 customLocalizedMediaName, | 954 customLocalizedMediaName, |
955 mediaSelect.options[mediaSelect.selectedIndex].text); | 955 mediaSelect.options[mediaSelect.selectedIndex].text); |
956 // Check the other media item. | 956 // Check the other media item. |
957 expectEquals( | 957 expectEquals( |
958 customMediaName, | 958 customMediaName, |
959 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); | 959 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); |
960 | 960 |
961 this.waitForAnimationToEnd('more-settings'); | 961 this.waitForAnimationToEnd('more-settings'); |
962 }); | 962 }); |
OLD | NEW |