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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/duplicate-revalidation-reload.html

Issue 268743003: [XHR] Delete an incorrect ASSERT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months 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/duplicate-revalidation-reload-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 <html>
2 <body>
3 <script src="/js-test-resources/js-test.js"></script>
4 <script>
5 (function() {
6 description('Make two XHRs for the resource which is already cached.');
7 window.jsTestIsAsync = true;
8 var url = 'resources/get.txt';
9 function get(xhr, async) {
10 return new Promise(function(resolve, reject) {
11 xhr.onreadystatechange = function() {
12 if (xhr.readyState === xhr.DONE) {
13 if (xhr.status === 200) {
14 resolve(xhr.responseText);
15 } else {
16 reject(xhr.status);
17 }
18 }
19 };
20 xhr.open('GET', url, async);
21 xhr.send();
22 });
23 }
24 var xhr1 = new XMLHttpRequest();
25 var xhr2 = new XMLHttpRequest();
26
27 Promise.resolve().then(function() {
28 var async = get(xhr1, true);
29 var sync = get(xhr2, false);
30 return Promise.all([sync, async]);
31 }).then(function(results) {
32 window.result1 = results[0];
33 window.result2 = results[1];
34 shouldBeEqualToString('result1', 'PASS');
35 shouldBeEqualToString('result2', 'PASS');
36 if (localStorage.reload) {
37 testPassed('DONE');
38 finishJSTest();
39 } else {
40 localStorage.reload = true;
41 location.reload(true);
42 }
43 }, function(e) {
44 testFailed(e);
45 finishJSTest();
46 });
47 }());
48
49 </script>
50 </body>
51 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/duplicate-revalidation-reload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698