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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html

Issue 2867573002: Upstream service worker indexedDB tests to WPT (Closed)
Patch Set: Simplify Created 3 years, 7 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: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html
index a6f66517910eefd54abc722c7cf16a7d6f3794ac..9d7b5cd87f41fd1946659d4d561a779433ccc039 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html
@@ -57,4 +57,31 @@ async_test(function(t) {
.catch(unreached_rejection(t));
}
}, 'postMessage to a ServiceWorker (and back via MessagePort)');
+
Marijn Kruisselbrink 2017/05/30 19:24:41 did you intend to have this as part of this change
mike3 2017/05/30 21:22:32 No, I did not. This was part of my research regard
+
+promise_test(function(t) {
+ var scope = 'resources/blank.html';
+ var worker;
+
+ return service_worker_unregister_and_register(
+ t, 'resources/postmessage-worker.js', scope)
+ .then(function(registration) {
+ worker = registration.installing;
+ return new Promise(function(resolve) {
+ worker.addEventListener('statechange', function(event) {
+ if (event.target.state === 'activated') {
+ resolve(registration);
+ }
+ });
+ });
+ })
+ .then(function(registration) {
+ return registration.unregister();
+ })
+ .then(function() {
+ assert_throws({ name: 'InvalidStateError' }, function() {
+ worker.postMessage({});
+ });
+ });
+ }, 'invoked on a redundant worker');
</script>

Powered by Google App Engine
This is Rietveld 408576698