| Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver.html
|
| similarity index 79%
|
| copy from third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400.html
|
| copy to third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver.html
|
| index d59d53586e306e8e675d9ea6ae10e4847bfd311e..e8cbda9267d629f83c32ecc94dc762004528b05b 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver.html
|
| @@ -1,8 +1,10 @@
|
| <html>
|
| <body>
|
| -<p>Test that preflight requests with invalid status code results in error. Should print PASS.</p>
|
| +<p>Test that 'Save-Data' header is treated as a simple header and preflight request is not created. Should print PASS.</p>
|
| <div id="log"></div>
|
| <script>
|
| +window.internals.settings.setDataSaverEnabled(true);
|
| +
|
| function log(message) {
|
| document.getElementById("log").innerHTML += message + "<br>";
|
| }
|
| @@ -14,17 +16,17 @@ if (window.layoutTestController) {
|
|
|
| var xhr = new XMLHttpRequest();
|
| xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-preflight-request-invalid-status.php?code=400");
|
| -xhr.setRequestHeader("X-Custom-Header", "PASS");
|
| xhr.onerror = function () {
|
| - log("PASS");
|
| + log("FAIL");
|
| if (window.layoutTestController)
|
| layoutTestController.notifyDone();
|
| };
|
| xhr.onload = function () {
|
| - log("FAIL");
|
| + log("PASS");
|
| if (window.layoutTestController)
|
| layoutTestController.notifyDone();
|
| };
|
| xhr.send();
|
| </script>
|
| +</body>
|
| </html>
|
|
|