| OLD | NEW |
| 1 if (window.GCController) | 1 if (window.GCController) |
| 2 GCController.collectAll(); | 2 GCController.collectAll(); |
| 3 var initialize_InspectorTest = function() { | 3 var initialize_InspectorTest = function() { |
| 4 | 4 |
| 5 var results = []; | 5 var results = []; |
| 6 | 6 |
| 7 function consoleOutputHook(messageType) | 7 function consoleOutputHook(messageType) |
| 8 { | 8 { |
| 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
| 10 } | 10 } |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 { | 516 { |
| 517 var barrier = new CallbackBarrier(); | 517 var barrier = new CallbackBarrier(); |
| 518 var targets = WebInspector.targetManager.targets(); | 518 var targets = WebInspector.targetManager.targets(); |
| 519 for (var i = 0; i < targets.length; ++i) | 519 for (var i = 0; i < targets.length; ++i) |
| 520 targets[i]._connection.deprecatedRunAfterPendingDispatches(barrier.creat
eCallback()); | 520 targets[i]._connection.deprecatedRunAfterPendingDispatches(barrier.creat
eCallback()); |
| 521 barrier.callWhenDone(InspectorTest.safeWrap(callback)); | 521 barrier.callWhenDone(InspectorTest.safeWrap(callback)); |
| 522 } | 522 } |
| 523 | 523 |
| 524 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey) | 524 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey) |
| 525 { | 525 { |
| 526 var keyIdentifier = key; | 526 return new KeyboardEvent("keydown", {key: key, bubbles: true, cancelable: tr
ue, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey}); |
| 527 if (key === "Tab") | |
| 528 keyIdentifier = "U+0009"; | |
| 529 else if (key == "Escape") | |
| 530 keyIdentifier = "U+001B"; | |
| 531 else if (key == "ArrowUp") | |
| 532 keyIdentifier = "Up"; | |
| 533 else if (key == "ArrowDown") | |
| 534 keyIdentifier = "Down"; | |
| 535 return new KeyboardEvent("keydown", {key: key, keyIdentifier: keyIdentifier,
bubbles: true, cancelable: true, ctrlKey: ctrlKey, altKey: altKey, shiftKey: sh
iftKey, metaKey: metaKey}); | |
| 536 } | 527 } |
| 537 | 528 |
| 538 InspectorTest.runTestSuite = function(testSuite) | 529 InspectorTest.runTestSuite = function(testSuite) |
| 539 { | 530 { |
| 540 var testSuiteTests = testSuite.slice(); | 531 var testSuiteTests = testSuite.slice(); |
| 541 | 532 |
| 542 function runner() | 533 function runner() |
| 543 { | 534 { |
| 544 if (!testSuiteTests.length) { | 535 if (!testSuiteTests.length) { |
| 545 InspectorTest.completeTest(); | 536 InspectorTest.completeTest(); |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 _output("[page] " + text); | 1203 _output("[page] " + text); |
| 1213 } | 1204 } |
| 1214 | 1205 |
| 1215 function _output(result) | 1206 function _output(result) |
| 1216 { | 1207 { |
| 1217 if (!outputElement) | 1208 if (!outputElement) |
| 1218 createOutputElement(); | 1209 createOutputElement(); |
| 1219 outputElement.appendChild(document.createTextNode(result)); | 1210 outputElement.appendChild(document.createTextNode(result)); |
| 1220 outputElement.appendChild(document.createElement("br")); | 1211 outputElement.appendChild(document.createElement("br")); |
| 1221 } | 1212 } |
| OLD | NEW |