| OLD | NEW |
| 1 <html manifest="resources/fallback.manifest"> | 1 <html manifest="resources/fallback.manifest"> |
| 2 <body> | 2 <body> |
| 3 <p>Test application cache fallback entries.</p> | 3 <p>Test application cache fallback entries.</p> |
| 4 <p>Should say SUCCESS:</p> | 4 <p>Should say SUCCESS:</p> |
| 5 <div id=result></div> | 5 <div id=result></div> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 if (window.testRunner) { | 8 if (window.testRunner) { |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 testRunner.waitUntilDone(); | 10 testRunner.waitUntilDone(); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 | 114 |
| 115 function test4() | 115 function test4() |
| 116 { | 116 { |
| 117 // Try loading a fallback resource as main one. | 117 // Try loading a fallback resource as main one. |
| 118 | 118 |
| 119 applicationCache.onnoupdate = test5; | 119 applicationCache.onnoupdate = test5; |
| 120 | 120 |
| 121 var ifr = document.createElement("iframe"); | 121 var ifr = document.createElement("iframe"); |
| 122 ifr.setAttribute("src", nonexistentURL); | 122 ifr.setAttribute("src", nonexistentURL); |
| 123 ifr.setAttribute("onload", "test5()"); |
| 123 document.body.appendChild(ifr); | 124 document.body.appendChild(ifr); |
| 124 } | 125 } |
| 125 | 126 |
| 127 var test5_calls = 0; |
| 128 |
| 126 function test5() | 129 function test5() |
| 127 { | 130 { |
| 131 test5_calls++; |
| 132 if (test5_calls == 1) { |
| 133 return; |
| 134 } |
| 128 if (!/Hello, World/.test(window.frames[0].document.documentElement.innerHTML
)) { | 135 if (!/Hello, World/.test(window.frames[0].document.documentElement.innerHTML
)) { |
| 129 log("FAIL: Fallback URL was not honored for main resource"); | 136 log("FAIL: Fallback URL was not honored for main resource"); |
| 130 hadError = true; | 137 hadError = true; |
| 131 } | 138 } |
| 132 test6(); | 139 test6(); |
| 133 } | 140 } |
| 134 | 141 |
| 135 function test6() | 142 function test6() |
| 136 { | 143 { |
| 137 setNetworkEnabled(false); | 144 setNetworkEnabled(false); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 148 | 155 |
| 149 applicationCache.onnoupdate = function() { test() } | 156 applicationCache.onnoupdate = function() { test() } |
| 150 applicationCache.oncached = function() { test() } | 157 applicationCache.oncached = function() { test() } |
| 151 | 158 |
| 152 applicationCache.onupdateready = function() { log("FAIL: received unexpected upd
ateready event") } | 159 applicationCache.onupdateready = function() { log("FAIL: received unexpected upd
ateready event") } |
| 153 applicationCache.onerror = function() { log("FAIL: received unexpected error eve
nt") } | 160 applicationCache.onerror = function() { log("FAIL: received unexpected error eve
nt") } |
| 154 | 161 |
| 155 </script> | 162 </script> |
| 156 </body> | 163 </body> |
| 157 </html> | 164 </html> |
| OLD | NEW |