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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/send-array-buffer.html

Issue 5569001: Merge 72866 - Add send(ArrayBuffer) to XMLHttpRequest per XMLHttpRequest Leve... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 Tests sending an array buffer. 3 Tests sending an array buffer.
4 <script> 4 <script>
5 if (window.layoutTestController) 5 if (window.layoutTestController)
6 layoutTestController.dumpAsText(); 6 layoutTestController.dumpAsText();
7 7
8 var console_messages = document.createElement("ul"); 8 var console_messages = document.createElement("ul");
9 document.body.appendChild(console_messages); 9 document.body.appendChild(console_messages);
10 10
11 function log(message) 11 function log(message)
12 { 12 {
13 var item = document.createElement("li"); 13 var item = document.createElement("li");
14 item.appendChild(document.createTextNode(message)); 14 item.appendChild(document.createTextNode(message));
15 console_messages.appendChild(item); 15 console_messages.appendChild(item);
16 } 16 }
17 17
18 var array = new Uint8Array([0, 1, 2, 48, 49, 50, 128, 129, 130, 253, 254, 255]); 18 var array = new Uint8Array([0, 1, 2, 48, 49, 50, 128, 129, 130, 253, 254, 255]);
19 var xhr = new XMLHttpRequest; 19 var xhr = new XMLHttpRequest;
20 xhr.open("POST", "resources/post-echo-as-ascii.cgi", false); 20 xhr.open("POST", "resources/post-echo-as-ascii.cgi", false);
21 xhr.send(array.buffer); 21 xhr.send(array.buffer);
22 log(xhr.responseText); 22 log(xhr.responseText);
23 </script> 23 </script>
24 </body> 24 </body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698