Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/test/data/webui/print_preview.js

Issue 7304014: Made Print Preview tests autogenerated from print_preview.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DEPS file to allow generated js2webui files to be included. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698