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

Side by Side Diff: LayoutTests/http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html

Issue 667743002: DevTools: remove "type" getters in Resource and NetworkRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
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 var image; 6 var image;
7 function loadFirstImage() { 7 function loadFirstImage() {
8 if (!window.internals) { 8 if (!window.internals) {
9 console.log("This test can not be run as window.internals is not availab le."); 9 console.log("This test can not be run as window.internals is not availab le.");
10 return; 10 return;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 function step2() 43 function step2()
44 { 44 {
45 imageRequest = InspectorTest.networkRequests().pop(); 45 imageRequest = InspectorTest.networkRequests().pop();
46 imageRequest.requestContent(step3); 46 imageRequest.requestContent(step3);
47 } 47 }
48 48
49 function step3() 49 function step3()
50 { 50 {
51 InspectorTest.addResult(imageRequest.url); 51 InspectorTest.addResult(imageRequest.url);
52 InspectorTest.addResult("request.type: " + imageRequest.type); 52 InspectorTest.addResult("request.type: " + imageRequest.resourceType());
53 InspectorTest.addResult("request.content.length after requesting content : " + imageRequest.content.length); 53 InspectorTest.addResult("request.content.length after requesting content : " + imageRequest.content.length);
54 InspectorTest.assertTrue(imageRequest.content.length > 0, "No content be fore destroying CachedResource."); 54 InspectorTest.assertTrue(imageRequest.content.length > 0, "No content be fore destroying CachedResource.");
55 55
56 InspectorTest.addResult("Releasing cached resource."); 56 InspectorTest.addResult("Releasing cached resource.");
57 // Loading another image to the same image element so that the original image cached resource is released. 57 // Loading another image to the same image element so that the original image cached resource is released.
58 InspectorTest.addConsoleSniffer(step4); 58 InspectorTest.addConsoleSniffer(step4);
59 InspectorTest.evaluateInPage("loadSecondImage()"); 59 InspectorTest.evaluateInPage("loadSecondImage()");
60 } 60 }
61 61
62 function step4(msg) 62 function step4(msg)
(...skipping 29 matching lines...) Expand all
92 } 92 }
93 } 93 }
94 </script> 94 </script>
95 </head> 95 </head>
96 <body onload="runTest()"> 96 <body onload="runTest()">
97 <p>Tests cached resource content is discarded when cached resource is destroyed if content size is too big for the resource agent's data storage.</p> 97 <p>Tests cached resource content is discarded when cached resource is destroyed if content size is too big for the resource agent's data storage.</p>
98 <a href="https://bugs.webkit.org/show_bug.cgi?id=92108">Bug 92108</a> 98 <a href="https://bugs.webkit.org/show_bug.cgi?id=92108">Bug 92108</a>
99 </body> 99 </body>
100 </html> 100 </html>
101 101
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698