| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 | 601 |
| 602 | 602 |
| 603 TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() | 603 TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() |
| 604 { | 604 { |
| 605 // Make sure the worker is loaded. | 605 // Make sure the worker is loaded. |
| 606 this.takeControl(); | 606 this.takeControl(); |
| 607 this._waitForTargets(2, callback.bind(this)); | 607 this._waitForTargets(2, callback.bind(this)); |
| 608 | 608 |
| 609 function callback() | 609 function callback() |
| 610 { | 610 { |
| 611 var target = WebInspector.targetManager.targetsWithJSContext()[0]; | 611 var target = WebInspector.targetManager.targets(WebInspector.Target.Capa
bility.JS)[0]; |
| 612 target._connection.deprecatedRunAfterPendingDispatches(this.releaseContr
ol.bind(this)); | 612 target._connection.deprecatedRunAfterPendingDispatches(this.releaseContr
ol.bind(this)); |
| 613 } | 613 } |
| 614 }; | 614 }; |
| 615 | 615 |
| 616 TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() | 616 TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() |
| 617 { | 617 { |
| 618 this.takeControl(); | 618 this.takeControl(); |
| 619 this._waitForTargets(2, callback.bind(this)); | 619 this._waitForTargets(2, callback.bind(this)); |
| 620 | 620 |
| 621 function callback() | 621 function callback() |
| 622 { | 622 { |
| 623 var target = WebInspector.targetManager.targetsWithJSContext()[0]; | 623 var target = WebInspector.targetManager.targets(WebInspector.Target.Capa
bility.JS)[0]; |
| 624 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 624 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 625 if (debuggerModel.isPaused()) { | 625 if (debuggerModel.isPaused()) { |
| 626 this.releaseControl(); | 626 this.releaseControl(); |
| 627 return; | 627 return; |
| 628 } | 628 } |
| 629 this._waitForScriptPause(this.releaseControl.bind(this)); | 629 this._waitForScriptPause(this.releaseControl.bind(this)); |
| 630 } | 630 } |
| 631 }; | 631 }; |
| 632 | 632 |
| 633 TestSuite.prototype.enableTouchEmulation = function() | 633 TestSuite.prototype.enableTouchEmulation = function() |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 /** | 1170 /** |
| 1171 * Key event with given key identifier. | 1171 * Key event with given key identifier. |
| 1172 */ | 1172 */ |
| 1173 TestSuite.createKeyEvent = function(key) | 1173 TestSuite.createKeyEvent = function(key) |
| 1174 { | 1174 { |
| 1175 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); | 1175 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1176 }; | 1176 }; |
| 1177 | 1177 |
| 1178 window.uiTests = new TestSuite(window.domAutomationController); | 1178 window.uiTests = new TestSuite(window.domAutomationController); |
| 1179 })(window); | 1179 })(window); |
| OLD | NEW |