Index: LayoutTests/http/tests/inspector/inspector-test.js |
diff --git a/LayoutTests/http/tests/inspector/inspector-test.js b/LayoutTests/http/tests/inspector/inspector-test.js |
index 35e948c72a732f096bc926b65e8a35e014003cb0..4e42a201c75dc8b832433a18381c7c2f5d350d44 100644 |
--- a/LayoutTests/http/tests/inspector/inspector-test.js |
+++ b/LayoutTests/http/tests/inspector/inspector-test.js |
@@ -94,6 +94,10 @@ InspectorTest.check = function(passCondition, failureText) |
InspectorTest.addResult = function(text) |
{ |
+ if (InspectorTest._resultBufferring) { |
+ InspectorTest._resultBufferringContent += text + "\n"; |
+ return; |
+ } |
results.push(text); |
if (resultsSynchronized) |
InspectorTest.Output.addResult(text); |
@@ -105,6 +109,20 @@ InspectorTest.addResult = function(text) |
} |
} |
+InspectorTest.beginResultBufferring = function() |
+{ |
+ InspectorTest._resultBufferring = true; |
+ InspectorTest._resultBufferringContent = ""; |
+} |
+ |
+InspectorTest.endResultBufferring = function() |
+{ |
+ var result = InspectorTest._resultBufferringContent || ""; |
+ delete InspectorTest._resultBufferring; |
+ delete InspectorTest._resultBufferringContent; |
+ return result; |
+} |
+ |
InspectorTest.addResults = function(textArray) |
{ |
if (!textArray) |