Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=182548 #9420

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -8,11 +8,13 @@
<script>
'use strict';

var host_info = get_host_info();

// Loads a non-secure url in a new window, which redirects to |target_url|.
// That page then registers a service worker, and messages back with the result.
// Returns a promise that resolves with the result.
function redirect_and_register(target_url) {
var redirect_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
var redirect_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
'resources/redirect.py?Redirect=';
var child = window.open(redirect_url + encodeURIComponent(target_url));
return new Promise(resolve => {
Expand All @@ -35,7 +37,7 @@
}, 'register on a secure page after redirect from an non-secure url');

promise_test(function(t) {
var target_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
var target_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
'resources/http-to-https-redirect-and-register-iframe.html';

return redirect_and_register(target_url)
Expand Down
6 changes: 4 additions & 2 deletions service-workers/service-worker/update-bytecheck.https.html
Expand Up @@ -5,6 +5,7 @@
<script src="resources/testharness-helpers.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script>

/*
Expand All @@ -26,11 +27,12 @@
{cors: true, main: 'time', imported: 'default'},
{cors: true, main: 'time', imported: 'time' }];

const host_info = get_host_info();
settings.reduce((p, s) => {
return p.then(promise_test(function(t) {
var path = !s.cors ? ''
: 'https://www1.web-platform.test:8443/' +
'service-workers/service-worker/resources/';
: host_info.HTTPS_REMOTE_ORIGIN +
'/service-workers/service-worker/resources/';
var script = 'resources/bytecheck-worker.py' +
'?main=' + s.main +
'&imported=' + s.imported +
Expand Down