Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: LayoutTests/http/tests/appcache/fallback.html

Issue 720963002: Fix appcache/fallback test race exposed by the Blink Scheduler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check onupdate get's called. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/platform/linux/http/tests/appcache/fallback-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/platform/linux/http/tests/appcache/fallback-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698