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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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/imported/wpt/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-cors-xhr-iframe.html b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html
similarity index 76%
copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-cors-xhr-iframe.html
copy to third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html
index b2a5163d3d236d92cd29a4c01f9e5a97ab7f731e..48f618397c5cd8cf3a5d561c8e371818367cb890 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-cors-xhr-iframe.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html
@@ -1,7 +1,7 @@
-<script src="../../resources/get-host-info.js?pipe=sub"></script>
-<script src="test-helpers.js"></script>
+<script src="../resources/get-host-info.sub.js"></script>
+<script src="test-helpers.sub.js?pipe=sub"></script>
<script>
-var path = base_path() + 'fetch-access-control.php';
+var path = base_path() + 'fetch-access-control.py';
var host_info = get_host_info();
var SUCCESS = 'SUCCESS';
var FAIL = 'FAIL';
@@ -54,8 +54,8 @@ function create_serial_promise(test_cases) {
window.addEventListener('message', function(evt) {
var port = evt.ports[0];
- var url = host_info['HTTP_ORIGIN'] + path;
- var remote_url = host_info['HTTP_REMOTE_ORIGIN'] + path;
+ var url = host_info['HTTPS_ORIGIN'] + path;
+ var remote_url = host_info['HTTPS_REMOTE_ORIGIN'] + path;
// If the 4th value of the item of TEST_CASES is true, the test case outputs
// warning messages. So such tests must be executed in serial to match the
// expected output text.
@@ -65,6 +65,11 @@ window.addEventListener('message', function(evt) {
[url + '?reject', true, FAIL],
[remote_url + '?reject', false, FAIL],
[remote_url + '?reject', true, FAIL],
+ // Event handler exception tests
+ [url + '?throw', false, FAIL],
+ [url + '?throw', true, FAIL],
+ [remote_url + '?throw', false, FAIL],
+ [remote_url + '?throw', true, FAIL],
// Reject(resolve-null) tests
[url + '?resolve-null', false, FAIL],
[url + '?resolve-null', true, FAIL],
@@ -76,15 +81,15 @@ window.addEventListener('message', function(evt) {
[remote_url + '?ignore', false, FAIL, true], // Executed in serial.
[remote_url + '?ignore', true, FAIL, true], // Executed in serial.
[
- remote_url + '?ACAOrigin=' + host_info['HTTP_ORIGIN'] + '&ignore',
+ remote_url + '?ACAOrigin=' + host_info['HTTPS_ORIGIN'] + '&ignore',
false, SUCCESS
],
[
- remote_url + '?ACAOrigin=' + host_info['HTTP_ORIGIN'] + '&ignore',
+ remote_url + '?ACAOrigin=' + host_info['HTTPS_ORIGIN'] + '&ignore',
true, FAIL, true // Executed in serial.
],
[
- remote_url + '?ACAOrigin=' + host_info['HTTP_ORIGIN'] +
+ remote_url + '?ACAOrigin=' + host_info['HTTPS_ORIGIN'] +
'&ACACredentials=true&ignore',
true, SUCCESS
],
@@ -94,15 +99,15 @@ window.addEventListener('message', function(evt) {
[remote_url + '?Auth&ignore', false, FAIL, true], // Executed in serial.
[remote_url + '?Auth&ignore', true, FAIL, true], // Executed in serial.
[
- remote_url + '?Auth&ACAOrigin=' + host_info['HTTP_ORIGIN'] + '&ignore',
+ remote_url + '?Auth&ACAOrigin=' + host_info['HTTPS_ORIGIN'] + '&ignore',
false, 'STATUS401'
],
[
- remote_url + '?Auth&ACAOrigin=' + host_info['HTTP_ORIGIN'] + '&ignore',
+ remote_url + '?Auth&ACAOrigin=' + host_info['HTTPS_ORIGIN'] + '&ignore',
true, FAIL, true // Executed in serial.
],
[
- remote_url + '?Auth&ACAOrigin=' + host_info['HTTP_ORIGIN'] +
+ remote_url + '?Auth&ACAOrigin=' + host_info['HTTPS_ORIGIN'] +
'&ACACredentials=true&ignore',
true, SUCCESS
],
@@ -144,26 +149,41 @@ window.addEventListener('message', function(evt) {
[
url + '?mode=cors&url=' +
encodeURIComponent(remote_url + '?ACAOrigin=' +
- host_info['HTTP_ORIGIN']),
+ host_info['HTTPS_ORIGIN']),
false, SUCCESS
],
[
url + '?mode=cors&url=' +
encodeURIComponent(remote_url + '?ACAOrigin=' +
- host_info['HTTP_ORIGIN']),
+ host_info['HTTPS_ORIGIN']),
+ true, FAIL
+ ],
+ [
+ url + '?mode=cors&url=' +
+ encodeURIComponent(remote_url + '?ACAOrigin=' +
+ host_info['HTTPS_ORIGIN'] +
+ '&ACACredentials=true'),
true, SUCCESS
],
[
remote_url + '?mode=cors&url=' +
encodeURIComponent(remote_url + '?ACAOrigin=' +
- host_info['HTTP_ORIGIN']),
+ host_info['HTTPS_ORIGIN']),
false, SUCCESS
],
[
remote_url +
'?mode=cors&url=' +
encodeURIComponent(remote_url + '?ACAOrigin=' +
- host_info['HTTP_ORIGIN']),
+ host_info['HTTPS_ORIGIN']),
+ true, FAIL
+ ],
+ [
+ remote_url +
+ '?mode=cors&url=' +
+ encodeURIComponent(remote_url + '?ACAOrigin=' +
+ host_info['HTTPS_ORIGIN'] +
+ '&ACACredentials=true'),
true, SUCCESS
]
];

Powered by Google App Engine
This is Rietveld 408576698