Index: LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js |
diff --git a/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js b/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js |
index fd09d020d9de44ca0852e3691a9e38f2881c4d9c..225b608d0accb51194c350b5db8f7e2041047046 100644 |
--- a/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js |
+++ b/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js |
@@ -1,3 +1,7 @@ |
+if ("importScripts" in self) { |
+ importScripts("/resources/testharness-helpers.js"); |
+} |
+ |
self.onmessage = function(e) { |
navigator.connect(e.data.connect) |
.then(function(port) { |
@@ -7,6 +11,6 @@ self.onmessage = function(e) { |
// Not all errors can be serialized as a SerializedScriptValue, so |
// convert to JSON and parse to get just the bits that certainly can. |
e.data.port.postMessage( |
- {success: false, result: JSON.parse(JSON.stringify(error))}); |
+ {success: false, result: JSON.parse(stringifyDOMObject(error))}); |
}); |
}; |