Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html |
| diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html b/LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html |
| index 06de143fcb312017ba82bb4ddda878bb4de2e1a2..ac15449ef67e6f4f6704535c15a6a0cda5a2d6aa 100644 |
| --- a/LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html |
| +++ b/LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html |
| @@ -79,6 +79,14 @@ function custom_method_test() { |
| }); |
| } |
| +function options_method_test() { |
| + return xhr_send(host_info['HTTP_ORIGIN'], 'OPTIONS', 'test string xxx', false) |
| + .then(function(response){ |
|
yhirano
2014/11/21 03:44:51
please add a space after between ')' and '{'
yhirano
2014/11/21 03:51:45
Sorry, I meant
please add a space between ')' and
horo
2014/11/21 04:22:49
Done.
|
| + assert_equals(response.method, 'OPTIONS'); |
| + assert_equals(response.body, 'test string xxx'); |
| + }); |
| +} |
| + |
| function form_data_test() { |
| return create_file_system_file('fsfile.txt', 'fs file content') |
| .then(function(file_system_file) { |
| @@ -161,39 +169,15 @@ function data_url_test() { |
| }); |
| } |
| -function xhr_options_test() { |
| - return new Promise(function(resolve, reject) { |
| - var xhr = new XMLHttpRequest(); |
| - xhr.onload = function() { |
| - resolve(xhr.response); |
| - }; |
| - xhr.onerror = function() { |
| - reject('XHR should succeed.'); |
| - }; |
| - xhr.responseType = 'text'; |
| - xhr.open('OpTiOnS', 'fetch-access-control.php', true); |
| - xhr.send(); |
| - }) |
| - .then(function(data) { |
| - var result; |
| - var report = function(arg) { |
| - result = arg; |
| - }; |
| - eval(data); |
| - assert_equals(result['jsonpResult'], 'success'); |
| - assert_equals(result['method'], 'OPTIONS'); |
| - }) |
| -} |
| - |
| window.addEventListener('message', function(evt) { |
| var port = evt.ports[0]; |
| string_test() |
| .then(blob_test) |
| .then(custom_method_test) |
| + .then(options_method_test) |
| .then(form_data_test) |
| .then(mode_credentials_test) |
| .then(data_url_test) |
| - .then(xhr_options_test) |
| .then(function() { port.postMessage({results: 'finish'}); }) |
| .catch(function(e) { port.postMessage({results: 'failure:' + e}); }); |
| }); |