Skip to content

Instantly share code, notes, and snippets.

@jugglinmike
Created May 11, 2017 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jugglinmike/6bacb96355252f5c2cb2237e9d511190 to your computer and use it in GitHub Desktop.
Save jugglinmike/6bacb96355252f5c2cb2237e9d511190 to your computer and use it in GitHub Desktop.
sw-migration-iso.diff
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/iso-latin1-header.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/iso-latin1-header.https.html
similarity index 76%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/iso-latin1-header.html
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/iso-latin1-header.https.html
index 938fbd3..ad0ab59 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/iso-latin1-header.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/iso-latin1-header.https.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<title>Service Worker: respondWith with header value containing an ISO Latin 1 (ISO-8859-1 Character Set) string</title>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/get-host-info.js?pipe=sub"></script>
-<script src="resources/test-helpers.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/test-helpers.sub.js"></script>
<script>
async_test(function(t) {
var SCOPE = 'resources/iso-latin1-header-iframe.html';
@@ -16,16 +16,17 @@ async_test(function(t) {
.then(function() { return with_iframe(SCOPE); })
.then(function(frame) {
var channel = new MessageChannel();
+ t.add_cleanup(function() {
+ frame.remove();
+ });
channel.port1.onmessage = t.step_func(function(e) {
assert_equals(e.data.results, 'finish');
- frame.remove();
service_worker_unregister_and_done(t, SCOPE);
});
frame.contentWindow.postMessage({},
- host_info['HTTP_ORIGIN'],
+ host_info['HTTPS_ORIGIN'],
[channel.port2]);
})
.catch(unreached_rejection(t));
}, 'Verify the response of FetchEvent using XMLHttpRequest');
-
</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iso-latin1-header-iframe.html
similarity index 87%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iso-latin1-header-iframe.html
index 8da2582..90e3f69 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iso-latin1-header-iframe.html
@@ -1,7 +1,4 @@
-<script src="../../resources/testharness.js"></script>
-<script src="test-helpers.js"></script>
<script>
-
function xhr_send(method, data) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
@@ -23,5 +20,4 @@ window.addEventListener('message', function(evt) {
.then(function() { port.postMessage({results: 'finish'}); })
.catch(function(e) { port.postMessage({results: 'failure:' + e}); });
});
-
</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-worker.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iso-latin1-header-worker.js
similarity index 100%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-worker.js
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/iso-latin1-header-worker.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment