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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/post-arraybuffer-data-view.html

Issue 684653003: Adding layout test for ArrayBufferView Posting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: After changing from sync to async. Created 6 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/post-arraybuffer-data-view-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <script src="/js-test-resources/js-test.js"></script>
4 <script>
5 description('Test for ArrayBuffer POST in XMLHttpRequest send');
6 window.jsTestIsAsync = true;
7
8 new Promise(function(resolve, reject) {
9 var array = new Uint8Array([0, 1, 2, 25, 45, 58, 255]);
10 var xhr = new XMLHttpRequest;
11 xhr.open('POST', 'resources/post-echo-as-ascii.cgi', true);
12 xhr.onreadystatechange = function() {
13 if (xhr.readyState === 4) {
14 debug('xhr.readyState = ' + xhr.readyState + ': responseURL = ' + xh r.responseURL);
15 resolve(xhr);
16 }
17 }
18 xhr.send(new DataView(array.buffer));
19 }).then(function(xhr) {
20 window.status = xhr.status;
21 shouldBeEqualToString('status', '200');
22 responseText = xhr.responseText;
23 shouldBeEqualToString('responseText', '0 1 2 25 45 58 255');
24 }).catch(function(reason) {
25 testFailed(String(reason));
26 }).then(finishJSTest, finishJSTest);
27
28 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/post-arraybuffer-data-view-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698