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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 InspectorTest.evaluateInPageWithTimeout = function(code) | 59 InspectorTest.evaluateInPageWithTimeout = function(code) |
60 { | 60 { |
61 // FIXME: we need a better way of waiting for chromium events to happen | 61 // FIXME: we need a better way of waiting for chromium events to happen |
62 InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'), 1
)"); | 62 InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'), 1
)"); |
63 } | 63 } |
64 | 64 |
65 InspectorTest.evaluateFunctionInOverlay = function(func, callback) | 65 InspectorTest.evaluateFunctionInOverlay = function(func, callback) |
66 { | 66 { |
67 var expression = "testRunner.evaluateInWebInspectorOverlay(\"(\" + " + func
+ " + \")()\")"; | 67 var expression = "testRunner.evaluateInWebInspectorOverlay(\"(\" + " + func
+ " + \")()\")"; |
68 var mainContext = InspectorTest.runtimeModel.executionContexts()[0]; | 68 var mainContext = InspectorTest.runtimeModel.executionContexts()[0]; |
69 mainContext.evaluate(expression, "", false, false, true, false, wrapCallback
); | 69 mainContext.evaluate(expression, "", false, false, true, false, false, wrapC
allback); |
70 | 70 |
71 function wrapCallback(val, err, result) | 71 function wrapCallback(val, err, result) |
72 { | 72 { |
73 callback(result.value) | 73 callback(result.value) |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 var lastEvalId = 0; | 77 var lastEvalId = 0; |
78 var pendingEvalRequests = {}; | 78 var pendingEvalRequests = {}; |
79 | 79 |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 _output("[page] " + text); | 1206 _output("[page] " + text); |
1207 } | 1207 } |
1208 | 1208 |
1209 function _output(result) | 1209 function _output(result) |
1210 { | 1210 { |
1211 if (!outputElement) | 1211 if (!outputElement) |
1212 createOutputElement(); | 1212 createOutputElement(); |
1213 outputElement.appendChild(document.createTextNode(result)); | 1213 outputElement.appendChild(document.createTextNode(result)); |
1214 outputElement.appendChild(document.createElement("br")); | 1214 outputElement.appendChild(document.createElement("br")); |
1215 } | 1215 } |
OLD | NEW |