Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / appcache / resources / offline-access.js
bloba69d73e5680becd5d2ed9b0ba740e52a3bc9b61b
1 function test()
3 applicationCache.oncached = function() { log("cached") }
4 applicationCache.onnoupdate = function() { log("noupdate") }
5 applicationCache.onerror = function() { log("error") }
7 try {
8 var req = new XMLHttpRequest;
9 req.open("GET", "/resources/network-simulator.php?path=/appcache/resources/simple.txt", false);
10 req.send(null);
11 if (req.responseText == "Hello, World!")
12 parent.postMessage("done", "*");
13 else
14 alert("FAIL, unexpected response: " + ex);
15 } catch (ex) {
16 alert("FAIL, unexpected error: " + ex);