OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 if (window.domAutomationController) { |
| 6 var uiTests = {}; |
| 7 |
| 8 uiTests.runTest = function(name) |
| 9 { |
| 10 if (uiTests._testSuite) |
| 11 uiTests._testSuite._runTest(name); |
| 12 else |
| 13 uiTests._pendingTestName = name; |
| 14 }; |
| 15 |
| 16 uiTests.testSuiteReady = function(testSuiteConstructor) |
| 17 { |
| 18 uiTests._testSuite = testSuiteConstructor(window.domAutomationController
); |
| 19 if (uiTests._pendingTestName) { |
| 20 var name = uiTests._pendingTestName; |
| 21 delete uiTests._pendingTestName; |
| 22 uiTests._testSuite._runTest(name); |
| 23 } |
| 24 }; |
| 25 } |
OLD | NEW |