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 // extension_apitest.js | 5 // extension_apitest.js |
6 // mini-framework for ExtensionApiTest browser tests | 6 // mini-framework for ExtensionApiTest browser tests |
7 | 7 |
8 var chrome = chrome || {}; | |
9 (function() { | |
10 chrome.test = chrome.test || {}; | 8 chrome.test = chrome.test || {}; |
11 | 9 |
12 chrome.test.tests = chrome.test.tests || []; | 10 chrome.test.tests = chrome.test.tests || []; |
13 | 11 |
14 var completed = false; | 12 var completed = false; |
15 var currentTest = null; | 13 var currentTest = null; |
16 var lastTest = null; | 14 var lastTest = null; |
17 | 15 |
18 function complete() { | 16 function complete() { |
19 completed = true; | 17 completed = true; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 }; | 266 }; |
269 | 267 |
270 chrome.test.callbackFail = function(expectedError, func) { | 268 chrome.test.callbackFail = function(expectedError, func) { |
271 return chrome.test.callback(func, expectedError); | 269 return chrome.test.callback(func, expectedError); |
272 }; | 270 }; |
273 | 271 |
274 chrome.test.runTests = function(tests) { | 272 chrome.test.runTests = function(tests) { |
275 chrome.test.tests = tests; | 273 chrome.test.tests = tests; |
276 chrome.test.runNextTest(); | 274 chrome.test.runNextTest(); |
277 }; | 275 }; |
278 })(); | |
OLD | NEW |