Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js

Issue 885343002: bindings: Fixes connect-helper to use stringifyDOMObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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))});
});
};

Powered by Google App Engine
This is Rietveld 408576698