OLD | NEW |
1 var initialize_InspectorTest = function() { | 1 var initialize_InspectorTest = function() { |
2 | 2 |
3 var results = []; | 3 var results = []; |
4 var resultsSynchronized = false; | 4 var resultsSynchronized = false; |
5 | 5 |
6 function consoleOutputHook(messageType) | 6 function consoleOutputHook(messageType) |
7 { | 7 { |
8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
9 } | 9 } |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 InspectorTest.addResults = function(textArray) | 115 InspectorTest.addResults = function(textArray) |
116 { | 116 { |
117 if (!textArray) | 117 if (!textArray) |
118 return; | 118 return; |
119 for (var i = 0, size = textArray.length; i < size; ++i) | 119 for (var i = 0, size = textArray.length; i < size; ++i) |
120 InspectorTest.addResult(textArray[i]); | 120 InspectorTest.addResult(textArray[i]); |
121 } | 121 } |
122 | 122 |
123 function onError(event) | 123 window.onerror = function (message, filename, lineno, colno, error) |
124 { | 124 { |
125 window.removeEventListener("error", onError); | 125 InspectorTest.addResult("Uncaught exception in inspector front-end: " + mess
age + " [" + error.stack + "]"); |
126 InspectorTest.addResult("Uncaught exception in inspector front-end: " + even
t.message + " [" + event.filename + ":" + event.lineno + "]"); | |
127 InspectorTest.completeTest(); | 126 InspectorTest.completeTest(); |
128 } | 127 } |
129 | 128 |
130 window.addEventListener("error", onError); | |
131 | |
132 InspectorTest.formatters = {}; | 129 InspectorTest.formatters = {}; |
133 | 130 |
134 InspectorTest.formatters.formatAsTypeName = function(value) | 131 InspectorTest.formatters.formatAsTypeName = function(value) |
135 { | 132 { |
136 return "<" + typeof value + ">"; | 133 return "<" + typeof value + ">"; |
137 } | 134 } |
138 | 135 |
139 InspectorTest.formatters.formatAsRecentTime = function(value) | 136 InspectorTest.formatters.formatAsRecentTime = function(value) |
140 { | 137 { |
141 if (typeof value !== "object" || !(value instanceof Date)) | 138 if (typeof value !== "object" || !(value instanceof Date)) |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 evaluateInWebInspector: function(callId, script) | 741 evaluateInWebInspector: function(callId, script) |
745 { | 742 { |
746 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); | 743 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); |
747 }, | 744 }, |
748 | 745 |
749 display: function() { } | 746 display: function() { } |
750 } | 747 } |
751 | 748 |
752 if (!window.testRunner && window.opener) | 749 if (!window.testRunner && window.opener) |
753 window.testRunner = new StandaloneTestRunnerStub(); | 750 window.testRunner = new StandaloneTestRunnerStub(); |
OLD | NEW |