Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / resources / invalid-header-iframe.html
blob76d0e3a433f39e5c24e19c7bc32bf4a292ca5246
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 reject('XHR must fail.');
11 xhr.onerror = function() {
12 resolve();
14 xhr.responseType = 'text';
15 xhr.open(method, './dummy?test', true);
16 xhr.send(data);
17 });
21 window.addEventListener('message', function(evt) {
22 var port = evt.ports[0];
23 xhr_send('POST', 'test string')
24 .then(function() { port.postMessage({results: 'finish'}); })
25 .catch(function(e) { port.postMessage({results: 'failure:' + e}); });
26 });
27 </script>