Bug 1189656 - Fix fetch-request-fallback test paths. r=bkelly

Update web-platform-tests expected data

--HG--
extra : commitid : 66I37Isc5zz
extra : rebase_source : dbef1623c5f8f3c0304c7f6eca0deef28ccb6604
This commit is contained in:
Nikhil Marathe 2015-09-10 16:45:54 -07:00
Родитель b4b28bfb9d
Коммит c68bfd1bc3
3 изменённых файлов: 12 добавлений и 16 удалений

Просмотреть файл

@ -1,6 +0,0 @@
[fetch-request-fallback.https.html]
type: testharness
expected: TIMEOUT
[Verify the fallback behavior of FetchEvent]
expected: TIMEOUT

Просмотреть файл

@ -12,7 +12,7 @@ function xhr_fail_test(frame, url) {
return new Promise(function(resolve, reject) {
frame.contentWindow.xhr(url)
.then(function(){
reject(msg + ' should fail.');
reject(url + ' should fail.');
})
.catch(function(){
resolve();
@ -28,21 +28,22 @@ function xhr_succeed_test(frame, url) {
resolve();
})
.catch(function(){
reject(msg + ' should succeed.');
reject(url + ' should succeed.');
});
});
}
async_test(function(t) {
var path = new URL(".", window.location).pathname;
var SCOPE = 'resources/fetch-request-fallback-iframe.html';
var SCRIPT = 'resources/fetch-request-fallback-worker.js';
var host_info = get_host_info();
var BASE_URL = host_info['HTTP_ORIGIN'] +
'/service-worker/resources/fetch-access-control.py?';
var OTHER_BASE_URL = host_info['HTTP_REMOTE_ORIGIN'] +
'/service-worker/resources/fetch-access-control.py?';
var REDIRECT_URL = host_info['HTTP_ORIGIN'] +
'/service-worker/resources/redirect.py?Redirect=';
var BASE_URL = host_info['HTTPS_ORIGIN'] +
path + 'resources/fetch-access-control.py?';
var OTHER_BASE_URL = host_info['HTTPS_REMOTE_ORIGIN'] +
path + 'resources/fetch-access-control.py?';
var REDIRECT_URL = host_info['HTTPS_ORIGIN'] +
path + 'resources/redirect.py?Redirect=';
var frame;
var worker;
service_worker_unregister_and_register(t, SCRIPT, SCOPE)
@ -94,9 +95,9 @@ async_test(function(t) {
assert_equals(requests[0].url, new URL(SCOPE, location).toString(),
'The first request to the SW must be the request for ' +
'the page.');
assert_equals(requests[0].mode, 'no-cors',
assert_equals(requests[0].mode, 'same-origin',
'The mode of the first request to the SW must be ' +
'no-cors.');
'same-origin');
for (var i = 0; i < expected_urls.length; ++i) {
assert_equals(requests[i + 1].url, expected_urls[i],
'The URL of the request which was passed from XHR ' +

Просмотреть файл

@ -2,6 +2,7 @@ var requests = [];
self.addEventListener('message', function(event) {
event.data.port.postMessage({requests: requests});
requests = [];
});
self.addEventListener('fetch', function(event) {