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

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

Issue 7087014: Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the include of the generated dir to the condition for ! 'arm'. 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') | chrome/test/data/webui/sample_pass.js » ('j') | 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 }; 66 };
67 67
68 function verifyBasicPrintPreviewButtons(printEnabled) { 68 function verifyBasicPrintPreviewButtons(printEnabled) {
69 var printButton = $('print-button'); 69 var printButton = $('print-button');
70 assertTrue(printButton != null); 70 assertTrue(printButton != null);
71 var cancelButton = $('cancel-button'); 71 var cancelButton = $('cancel-button');
72 assertTrue(cancelButton != null); 72 assertTrue(cancelButton != null);
73 }; 73 };
74 74
75 registerCallbacks(); 75 if ('window' in this && 'registerCallbacks' in window)
76 registerCallbacks();
76 77
77 internal = { 78 internal = {
78 'verifyBasicPrintPreviewButtons': verifyBasicPrintPreviewButtons, 79 'verifyBasicPrintPreviewButtons': verifyBasicPrintPreviewButtons,
79 }; 80 };
80 })(); 81 })();
81 82
82 // Tests. 83 // Tests.
83 function testPrintPreview(printEnabled) { 84 function testPrintPreview(printEnabled) {
84 internal.verifyBasicPrintPreviewButtons(printEnabled); 85 internal.verifyBasicPrintPreviewButtons(printEnabled);
85 var printer_list = $('printer-list'); 86 var printer_list = $('printer-list');
86 assertTrue(printEnabled); 87 assertTrue(printEnabled);
87 assertTrue(printer_list.options.length >= 2); 88 assertTrue(printer_list.options.length >= 2);
88 assertEquals('FooName', printer_list.options[0].text); 89 assertEquals('FooName', printer_list.options[0].text);
89 assertEquals('FooDevice', printer_list.options[0].value); 90 assertEquals('FooDevice', printer_list.options[0].value);
90 assertEquals('BarName', printer_list.options[1].text); 91 assertEquals('BarName', printer_list.options[1].text);
91 assertEquals('BarDevice', printer_list.options[1].value); 92 assertEquals('BarDevice', printer_list.options[1].value);
92 } 93 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/sample_pass.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698