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

Side by Side Diff: LayoutTests/http/tests/inspector/network/network-image-404.html

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../network-test.js"></script> 4 <script src="../network-test.js"></script>
5 <script> 5 <script>
6 function loadData() 6 function loadData()
7 { 7 {
8 var image = new Image(); 8 var image = new Image();
9 image.src = "resources/404.php"; 9 image.src = "resources/404.php";
10 image.onerror = resourceLoaded; 10 image.onerror = resourceLoaded;
(...skipping 22 matching lines...) Expand all
33 var request1 = InspectorTest.networkRequests().pop(); 33 var request1 = InspectorTest.networkRequests().pop();
34 InspectorTest.addResult(request1.url); 34 InspectorTest.addResult(request1.url);
35 InspectorTest.addResult("resource.type: " + request1.resourceType()); 35 InspectorTest.addResult("resource.type: " + request1.resourceType());
36 InspectorTest.addResult("resource.content before requesting content: " + request1.content); 36 InspectorTest.addResult("resource.content before requesting content: " + request1.content);
37 InspectorTest.assertTrue(!request1.failed, "Resource loading failed."); 37 InspectorTest.assertTrue(!request1.failed, "Resource loading failed.");
38 request1.requestContent(step3); 38 request1.requestContent(step3);
39 } 39 }
40 40
41 function step3() 41 function step3()
42 { 42 {
43 var request1 = InspectorTest.networkRequests().pop(); 43 var requests = InspectorTest.networkRequests();
44 InspectorTest.addResult("resource.content after requesting content: " + request1.content); 44 requests.sort(function(a, b) {return a.url.localeCompare(b.url);});
45 InspectorTest.addResult("resources count = " + requests.length);
46 for (i = 0; i < requests.length; i++) {
47 InspectorTest.addResult(requests[i].url);
48 InspectorTest.addResult("resource.content after requesting content: " + requests[i].content);
49 }
50
45 51
46 InspectorTest.completeTest(); 52 InspectorTest.completeTest();
47 } 53 }
48 } 54 }
49 </script> 55 </script>
50 </head> 56 </head>
51 <body onload="runTest()"> 57 <body onload="runTest()">
52 <p>Tests content is available for failed image request.</p> 58 <p>Tests content is available for failed image request.</p>
53 <a href="https://bugs.webkit.org/show_bug.cgi?id=84265">Bug 84265</a> 59 <a href="https://bugs.webkit.org/show_bug.cgi?id=84265">Bug 84265</a>
54 </body> 60 </body>
55 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698