| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 514 |
| 515 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback) | 515 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback) |
| 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(keyIdentifier, ctrlKey, altKey, shiftKey
, metaKey) | 524 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey) |
| 525 { | 525 { |
| 526 var evt = document.createEvent("KeyboardEvent"); | 526 var keyIdentifier = key; |
| 527 evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel *
/, null /* view */, keyIdentifier, "", ctrlKey, altKey, shiftKey, metaKey); | 527 if (key === "Tab") |
| 528 return evt; | 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}); |
| 529 } | 536 } |
| 530 | 537 |
| 531 InspectorTest.runTestSuite = function(testSuite) | 538 InspectorTest.runTestSuite = function(testSuite) |
| 532 { | 539 { |
| 533 var testSuiteTests = testSuite.slice(); | 540 var testSuiteTests = testSuite.slice(); |
| 534 | 541 |
| 535 function runner() | 542 function runner() |
| 536 { | 543 { |
| 537 if (!testSuiteTests.length) { | 544 if (!testSuiteTests.length) { |
| 538 InspectorTest.completeTest(); | 545 InspectorTest.completeTest(); |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 _output("[page] " + text); | 1212 _output("[page] " + text); |
| 1206 } | 1213 } |
| 1207 | 1214 |
| 1208 function _output(result) | 1215 function _output(result) |
| 1209 { | 1216 { |
| 1210 if (!outputElement) | 1217 if (!outputElement) |
| 1211 createOutputElement(); | 1218 createOutputElement(); |
| 1212 outputElement.appendChild(document.createTextNode(result)); | 1219 outputElement.appendChild(document.createTextNode(result)); |
| 1213 outputElement.appendChild(document.createElement("br")); | 1220 outputElement.appendChild(document.createElement("br")); |
| 1214 } | 1221 } |
| OLD | NEW |