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

Side by Side Diff: LayoutTests/http/tests/appcache/non-html.xhtml

Issue 14200030: Remove XMLHttpRequestException in favor of DOMException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests after rebasing... Created 7 years, 7 months 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
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml" 1 <html xmlns="http://www.w3.org/1999/xhtml"
2 manifest="/resources/network-simulator.php?path=/appcache/resources/non-ht ml.manifest"> 2 manifest="/resources/network-simulator.php?path=/appcache/resources/non-ht ml.manifest">
3 <head><title/></head> 3 <head><title/></head>
4 <body> 4 <body>
5 <p>Test that non-HTML main resources work with application cache correctly.</p> 5 <p>Test that non-HTML main resources work with application cache correctly.</p>
6 <p>Should say SUCCESS:</p> 6 <p>Should say SUCCESS:</p>
7 <div id="result"></div> 7 <div id="result"></div>
8 <script type="text/javascript"> 8 <script type="text/javascript">
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.dumpAsText() 10 testRunner.dumpAsText()
(...skipping 28 matching lines...) Expand all
39 applicationCache.removeEventListener('cached', cached, false); 39 applicationCache.removeEventListener('cached', cached, false);
40 40
41 setNetworkEnabled(false); 41 setNetworkEnabled(false);
42 42
43 // Load a resource that does not exist in the cache. 43 // Load a resource that does not exist in the cache.
44 try { 44 try {
45 var req = new XMLHttpRequest(); 45 var req = new XMLHttpRequest();
46 req.open("GET", "/resources/network-simulator.php?path=/appcache/resourc es/not-in-cache.txt", false); 46 req.open("GET", "/resources/network-simulator.php?path=/appcache/resourc es/not-in-cache.txt", false);
47 req.send(); 47 req.send();
48 } catch (e) { 48 } catch (e) {
49 if (e.code == XMLHttpRequestException.NETWORK_ERR) 49 if (e.code == DOMException.NETWORK_ERR)
50 hadError = true; 50 hadError = true;
51 } 51 }
52 52
53 if (!hadError) { 53 if (!hadError) {
54 document.getElementById('result').innerHTML = "FAILURE: Did not get the right exception" 54 document.getElementById('result').innerHTML = "FAILURE: Did not get the right exception"
55 return; 55 return;
56 } 56 }
57 57
58 // Load a resource that exists in the cache. 58 // Load a resource that exists in the cache.
59 try { 59 try {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 applicationCache.addEventListener('cached', cached, false); 98 applicationCache.addEventListener('cached', cached, false);
99 applicationCache.addEventListener('noupdate', cached, false); 99 applicationCache.addEventListener('noupdate', cached, false);
100 100
101 applicationCache.onerror = error; 101 applicationCache.onerror = error;
102 102
103 </script> 103 </script>
104 </body> 104 </body>
105 </html> 105 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt ('k') | LayoutTests/http/tests/appcache/simple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698