OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 (function() { | 5 (function() { |
6 function MockHandler() { | 6 function MockHandler() { |
7 this.__proto__ = MockHandler.prototype; | 7 this.__proto__ = MockHandler.prototype; |
8 }; | 8 }; |
9 | 9 |
10 MockHandler.prototype = { | 10 MockHandler.prototype = { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 mock_handler, | 63 mock_handler, |
64 mock_handler[func]); | 64 mock_handler[func]); |
65 } | 65 } |
66 }; | 66 }; |
67 | 67 |
68 if ('window' in this && 'registerMessageCallback' in window) | 68 if ('window' in this && 'registerMessageCallback' in window) |
69 registerCallbacks(); | 69 registerCallbacks(); |
70 })(); | 70 })(); |
71 | 71 |
72 // Tests. | 72 // Tests. |
73 function testPrintPreview(printEnabled) { | 73 function FLAKY_TestPrinterList() { |
74 var printButton = $('print-button'); | |
75 assertTrue(printButton != null, 'printButton != null'); | |
76 var cancelButton = $('cancel-button'); | |
77 assertTrue(cancelButton != null, 'cancelButton != null'); | |
78 var printer_list = $('printer-list'); | 74 var printer_list = $('printer-list'); |
79 assertTrue(printEnabled, 'printEnabled'); | |
80 assertTrue(!!printer_list, 'printer_list'); | 75 assertTrue(!!printer_list, 'printer_list'); |
81 assertTrue(printer_list.options.length >= 2, 'printer-list has at least 2'); | 76 assertTrue(printer_list.options.length >= 2, 'printer-list has at least 2'); |
82 expectEquals('FooName', printer_list.options[0].text, '0 text is FooName'); | 77 expectEquals('FooName', printer_list.options[0].text, '0 text is FooName'); |
83 expectEquals('FooDevice', printer_list.options[0].value, | 78 expectEquals('FooDevice', printer_list.options[0].value, |
84 '0 value is FooDevice'); | 79 '0 value is FooDevice'); |
85 expectEquals('BarName', printer_list.options[1].text, '1 text is BarName'); | 80 expectEquals('BarName', printer_list.options[1].text, '1 text is BarName'); |
86 expectEquals('BarDevice', printer_list.options[1].value, | 81 expectEquals('BarDevice', printer_list.options[1].value, |
87 '1 value is BarDevice'); | 82 '1 value is BarDevice'); |
88 } | 83 } |
| 84 |
| 85 var test_fixture = 'PrintPreviewWebUITest'; |
| 86 var test_add_library = false; |
OLD | NEW |