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

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

Issue 1198653004: Update client side navigator.connect API to use ServicePortCollection [3/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@serviceport-part2
Patch Set: rebase Created 5 years, 6 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 b479a149c7aa81a2d1e35b02b170e6a466536df3..7254e509f68b22010b39cb112c6fc289a680d029 100644
--- a/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js
+++ b/LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js
@@ -5,9 +5,17 @@ if ("importScripts" in self) {
self.onmessage = function(e) {
var service = e.data.connect;
- first_to_resolve([wrap_in_port(navigator.services.connect(service)), navigator.connect(service)])
+ wrap_in_port(navigator.services.connect(service, e.data.options))
.then(function(port) {
- e.data.port.postMessage({success: true, result: port}, [port]);
+ e.data.port.postMessage({
+ success: true,
+ result: {
+ port: port,
+ targetURL: port.targetURL,
+ name: port.name,
+ data: port.data
+ }
+ }, [port]);
})
.catch(function(error) {
// Not all errors can be serialized as a SerializedScriptValue, so

Powered by Google App Engine
This is Rietveld 408576698