Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/send-undefined-and-null.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <body>
3 Tests that sending undefined or null results in an empty request body.
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7
8 var console_messages = document.createElement("ul");
9 document.body.appendChild(console_messages);
10
11 function log(message)
12 {
13 var item = document.createElement("li");
14 item.appendChild(document.createTextNode(message));
15 console_messages.appendChild(item);
16 }
17
18 xhr = new XMLHttpRequest;
19 xhr.open("POST", "resources/post-echo.cgi", false);
20 xhr.send(undefined);
21 if (!xhr.responseText.length)
22 log("PASS for undefined");
23 else
24 log("FAILED: The posted content when sending 'undefined' is '" + xhr.respons eText +"'. It should have been ''.");
25
26 xhr = new XMLHttpRequest;
27 xhr.open("POST", "resources/post-echo.cgi", false);
28 xhr.send(null);
29 if (!xhr.responseText.length)
30 log("PASS for null");
31 else
32 log("FAILED: The posted content when sending 'null' is '" + xhr.responseText +"'. It should have been ''.");
33 </script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698