| <script> |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var req1 = new XMLHttpRequest(); |
| req1.onreadystatechange = function () { |
| if (this.readyState == 4) { |
| alert(internals.xhrResponseSource(req1) == "Network" ? "PASS" : "FAIL"); |
| var req2 = new XMLHttpRequest(); |
| req2.onreadystatechange = function () { |
| if (this.readyState == 4) { |
| alert(internals.xhrResponseSource(req2) == "Network" ? "PASS" : "FAIL"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| } |
| req2.open("GET", "resources/get.txt"); |
| req2.setRequestHeader("If-Modified-Since", "0"); |
| req2.send(null); |
| } |
| }; |
| req1.open("GET", "resources/get.txt"); |
| req1.setRequestHeader("If-Modified-Since", "0"); |
| req1.send(null); |
| |
| </script> |