3 <p>Test that offline applications' main resources are not affected by URL hashes.
</p>
4 <p>Should say SUCCESS:
</p>
8 if (window
.testRunner
) {
9 testRunner
.dumpAsText();
10 testRunner
.waitUntilDone();
15 document
.getElementById("result").innerHTML
+= message
+ "<br>";
18 function setNetworkEnabled(state
)
20 var req
= new XMLHttpRequest
;
21 req
.open("GET", "/resources/network-simulator.php?command=" + (state
? "connect" : "disconnect"), false);
25 function frameCreated()
29 setNetworkEnabled(false);
30 var ifr
= document
.createElement("iframe");
31 ifr
.setAttribute("src", "/resources/network-simulator.php?path=/appcache/resources/main-resource-hash-frame.html#bar");
32 document
.body
.appendChild(ifr
);
35 setNetworkEnabled(true);
36 if (window
.testRunner
)
37 testRunner
.notifyDone()
41 window
.addEventListener("message", frameCreated
, false);
44 setNetworkEnabled(true);
45 var ifr
= document
.createElement("iframe");
46 ifr
.setAttribute("src", "/resources/network-simulator.php?path=/appcache/resources/main-resource-hash-frame.html#foo");
47 document
.body
.appendChild(ifr
);