• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html manifest="resources/subframes-1.manifest">
2<body>
3<p>Test that a subframe without manifest doesn't pick an application cache from parent frame
4(as long as no relevant cache contains its resource).</p>
5<p>Techically, the check is that iframe subresources that are not in top frame cache are loaded
6anyway, so it can also pass if the UA fails to reject loads for cache misses.</p>
7<p>Should say SUCCESS:</p>
8<div id=result></div>
9
10<script>
11if (window.layoutTestController) {
12    layoutTestController.dumpAsText();
13    layoutTestController.waitUntilDone();
14}
15
16function log(message)
17{
18    document.getElementById("result").innerHTML += message + "<br>";
19}
20
21function test()
22{
23    var ifr = document.createElement("iframe");
24    ifr.setAttribute("src", "resources/subframe-1.html");
25    document.body.appendChild(ifr);
26}
27
28applicationCache.addEventListener('noupdate', function() { test() }, false);
29applicationCache.addEventListener('cached', function() { test() }, false);
30
31applicationCache.onupdateready = function() { log("FAIL: received unexpected updateready event") }
32applicationCache.onerror = function() { log("FAIL: received unexpected error event") }
33
34window.addEventListener("message", function() { log("SUCCESS"); if (window.layoutTestController) layoutTestController.notifyDone() }, false);
35
36</script>
37</body>
38</html>
39