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

Side by Side Diff: ui/webui/resources/js/webui_resource_test.js

Issue 2503453003: Remove all calls to domAutomationController.setAutomationId.
Patch Set: Fix nacl_browsertest_util.cc Created 3 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
« no previous file with comments | « ppapi/tests/test_case.html ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Tests that an observation matches the expected value. 6 * Tests that an observation matches the expected value.
7 * @param {Object} expected The expected value. 7 * @param {Object} expected The expected value.
8 * @param {Object} observed The actual value. 8 * @param {Object} observed The actual value.
9 * @param {string=} opt_message Optional message to include with a test 9 * @param {string=} opt_message Optional message to include with a test
10 * failure. 10 * failure.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 cleanTestRun = false; 188 cleanTestRun = false;
189 } 189 }
190 // Asynchronous tests must manually call continueTesting when complete. 190 // Asynchronous tests must manually call continueTesting when complete.
191 if (!isAsyncTest) 191 if (!isAsyncTest)
192 continueTesting(); 192 continueTesting();
193 } else { 193 } else {
194 done = true; 194 done = true;
195 endTests(cleanTestRun); 195 endTests(cleanTestRun);
196 } 196 }
197 if (!done) { 197 if (!done) {
198 domAutomationController.setAutomationId(1);
199 domAutomationController.send('PENDING'); 198 domAutomationController.send('PENDING');
200 } 199 }
201 } 200 }
202 201
203 exports.runTests = runTests; 202 exports.runTests = runTests;
204 })(this); 203 })(this);
205 204
206 /** 205 /**
207 * Signals completion of a test. 206 * Signals completion of a test.
208 * @param {boolean} success Indicates if the test completed successfully. 207 * @param {boolean} success Indicates if the test completed successfully.
209 */ 208 */
210 function endTests(success) { 209 function endTests(success) {
211 domAutomationController.setAutomationId(1);
212 domAutomationController.send(success ? 'SUCCESS' : 'FAILURE'); 210 domAutomationController.send(success ? 'SUCCESS' : 'FAILURE');
213 } 211 }
214 212
215 window.onerror = function() { 213 window.onerror = function() {
216 endTests(false); 214 endTests(false);
217 }; 215 };
OLDNEW
« no previous file with comments | « ppapi/tests/test_case.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698