Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / resources / fetch-response-xhr-iframe.html
blob9f0bf04587d0b6d8db7cd31d607c32f460a3cd06
1 <script src="../../resources/testharness.js"></script>
2 <script src="test-helpers.js?pipe=sub"></script>
3 <script>
5 function xhr_send(method, data) {
6 return new Promise(function(resolve, reject) {
7 var xhr = new XMLHttpRequest();
8 xhr.onload = function() {
9 resolve(xhr);
11 xhr.onerror = function() {
12 reject('XHR should succeed.');
14 xhr.responseType = 'text';
15 xhr.open(method, './dummy?test', true);
16 xhr.send(data);
17 });
20 function coalesce_headers_test() {
21 return xhr_send('POST', 'test string')
22 .then(function(xhr) {
23 assert_equals(xhr.getResponseHeader('foo'), 'foo, bar');
24 });
27 window.addEventListener('message', function(evt) {
28 var port = evt.ports[0];
29 coalesce_headers_test()
30 .then(function() { port.postMessage({results: 'finish'}); })
31 .catch(function(e) { port.postMessage({results: 'failure:' + e}); });
32 });
33 </script>