Changeset 139332 in webkit
- Timestamp:
- Jan 10, 2013, 10:25:39 AM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139330 r139332 1 2013-01-10 John J. Barton <johnjbarton@chromium.org> 2 3 Web Inspector: Refactor InspectorTest to create output interface 4 https://bugs.webkit.org/show_bug.cgi?id=106231 5 6 Reviewed by Pavel Feldman. 7 8 Refactor InspectorTest to extract InspectorTest.Output, the API 9 used between InspectorTest and the test output reciever (the 10 test-script page by default). 11 12 * http/tests/inspector/inspector-test.js: 13 (initialize_InspectorTest.InspectorTest.Output.testComplete): 14 (initialize_InspectorTest.InspectorTest.Output.addResult): 15 (initialize_InspectorTest.InspectorTest.Output.clearResults): 16 (initialize_InspectorTest.InspectorTest.completeTest): 17 (initialize_InspectorTest.InspectorTest.addResult): 18 1 19 2013-01-10 Max Vujovic <mvujovic@adobe.com> 2 20 -
trunk/LayoutTests/http/tests/inspector/inspector-test.js
r136949 r139332 12 12 console.error = consoleOutputHook.bind(InspectorTest, "error"); 13 13 console.info = consoleOutputHook.bind(InspectorTest, "info"); 14 15 InspectorTest.Output = { // override in window.initialize_yourName 16 testComplete: function() 17 { 18 RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + InspectorTest.completeTestCallId + ", \"\")", "test"); 19 }, 20 21 addResult: function(text) 22 { 23 InspectorTest.evaluateInPage("output(unescape('" + escape(text) + "'))"); 24 }, 25 26 clearResults: function() 27 { 28 InspectorTest.evaluateInPage("clearOutput()"); 29 } 30 }; 14 31 15 32 InspectorTest.completeTest = function() … … 21 38 return; 22 39 } 23 RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + InspectorTest.completeTestCallId + ", \"\")", "test");40 InspectorTest.Output.testComplete(); 24 41 } 25 42 testDispatchQueueIsEmpty(); … … 74 91 results.push(text); 75 92 if (resultsSynchronized) 76 addResultToPage(text);93 InspectorTest.Output.addResult(text); 77 94 else { 78 clearResults();95 InspectorTest.Output.clearResults(); 79 96 for (var i = 0; i < results.length; ++i) 80 addResultToPage(results[i]);97 InspectorTest.Output.addResult(results[i]); 81 98 resultsSynchronized = true; 82 }83 84 function clearResults()85 {86 InspectorTest.evaluateInPage("clearOutput()");87 }88 89 function addResultToPage(text)90 {91 InspectorTest.evaluateInPage("output(unescape('" + escape(text) + "'))");92 99 } 93 100 }
Note:
See TracChangeset
for help on using the changeset viewer.