From decf19f205ecdc0db804653d285a199e5913094b Mon Sep 17 00:00:00 2001 From: "Hallvord R. M. Steen" Date: Thu, 18 Apr 2013 16:05:36 +0300 Subject: [PATCH 1/3] Create upload.php Some tests (e.g. FormData tests) rely on the upload.php helper file --- .../tests/submissions/Opera/resources/upload.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 XMLHttpRequest/tests/submissions/Opera/resources/upload.php diff --git a/XMLHttpRequest/tests/submissions/Opera/resources/upload.php b/XMLHttpRequest/tests/submissions/Opera/resources/upload.php new file mode 100644 index 00000000000000..978fa0e5b3a8a0 --- /dev/null +++ b/XMLHttpRequest/tests/submissions/Opera/resources/upload.php @@ -0,0 +1,12 @@ + $v) + echo "{$k}={$v},"; +echo "\n"; +if (!empty($_FILES)) + foreach ($_FILES as $k => $v) + echo "{$k}={$v['name']}:{$v['type']}:{$v['size']},"; + +?> From 0c2b4f0641fad80ecaafbe9d11471b4207037463 Mon Sep 17 00:00:00 2001 From: "Hallvord R. M. Steen" Date: Mon, 22 Apr 2013 20:19:20 +0200 Subject: [PATCH 2/3] fixing buggy tests and trying to fix helper files that don't seem to work well on w3c-test.org --- XMLHttpRequest/resources/conditional.php | 3 ++- XMLHttpRequest/resources/status.php | 3 ++- XMLHttpRequest/send-entity-body-none.htm | 2 +- .../setrequestheader-bogus-header.htm | 26 +++++++++---------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/XMLHttpRequest/resources/conditional.php b/XMLHttpRequest/resources/conditional.php index 2d1058c463ef76..e9482d471e173d 100644 --- a/XMLHttpRequest/resources/conditional.php +++ b/XMLHttpRequest/resources/conditional.php @@ -10,7 +10,8 @@ } if((!empty($match) && $match == $tag) || (!empty($modified) && $modified == $date)) { - header("HTTP/1.1 304 SUPERCOOL"); + //header("HTTP/1.1 304 SUPERCOOL"); + header("SUPERCOOL", true, 304); // try to make w3c-test.org play along.. exit; } header("Content-Type:text/plain"); diff --git a/XMLHttpRequest/resources/status.php b/XMLHttpRequest/resources/status.php index 055bc888015d1b..05f3f4fa3082c0 100644 --- a/XMLHttpRequest/resources/status.php +++ b/XMLHttpRequest/resources/status.php @@ -14,7 +14,8 @@ function stripslashes_recursive($var) { $text = $_GET["text"] ? $_GET["text"] : "OMG"; $content = $_GET["content"] ? $_GET["content"] : ""; $type = $_GET["type"] ? $_GET["type"] : ""; - header("HTTP/1.1 " . $code . " " . $text); + header("HTTP/1.1 " . $code . " " . $text, true, $code); + header($text, true, $code); // workaround to try to get it running on w3c-test.org header("Content-Type:" . $type); echo $content; exit; diff --git a/XMLHttpRequest/send-entity-body-none.htm b/XMLHttpRequest/send-entity-body-none.htm index 6e910bea5211e0..d442121c3bde7c 100644 --- a/XMLHttpRequest/send-entity-body-none.htm +++ b/XMLHttpRequest/send-entity-body-none.htm @@ -12,7 +12,7 @@ var client = new XMLHttpRequest() client.open("POST", "resources/content.php", false) client.send(null) - assert_equals(client.getResponseHeader("x-request-content-length"), "NO") + assert_equals(client.getResponseHeader("x-request-content-length"), "0") assert_equals(client.getResponseHeader("x-request-content-type"), "NO") }) diff --git a/XMLHttpRequest/setrequestheader-bogus-header.htm b/XMLHttpRequest/setrequestheader-bogus-header.htm index 83476b31833a1a..e4ff6421e427bc 100644 --- a/XMLHttpRequest/setrequestheader-bogus-header.htm +++ b/XMLHttpRequest/setrequestheader-bogus-header.htm @@ -9,20 +9,20 @@
From a5039a87c65b827b900e12ceac7f36bc6b9d35ef Mon Sep 17 00:00:00 2001 From: "Hallvord R. M. Steen" Date: Tue, 23 Apr 2013 12:52:17 +0200 Subject: [PATCH 3/3] also assert that the attempts to set document.body to invalid values did not in fact change document.body --- .../documents/dom-tree-accessors/document.body-setter-01.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/dom/documents/dom-tree-accessors/document.body-setter-01.html b/html/dom/documents/dom-tree-accessors/document.body-setter-01.html index 319000b9418add..6cfeb78f149b9a 100644 --- a/html/dom/documents/dom-tree-accessors/document.body-setter-01.html +++ b/html/dom/documents/dom-tree-accessors/document.body-setter-01.html @@ -7,6 +7,7 @@