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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 11 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="../resources-test.js"></script> 4 <script src="../resources-test.js"></script>
5 <script src="resource-tree-test.js"></script> 5 <script src="resource-tree-test.js"></script>
6 <link rel="stylesheet" href="resources/styles-initial.css"> 6 <link rel="stylesheet" href="resources/styles-initial.css">
7 <script> 7 <script>
8 function createScriptTag() 8 function createScriptTag()
9 { 9 {
10 var scriptElement = document.createElement("script"); 10 var scriptElement = document.createElement("script");
(...skipping 21 matching lines...) Expand all
32 function step4() 32 function step4()
33 { 33 {
34 InspectorTest.NetworkAgent.setCacheDisabled(false, step5); 34 InspectorTest.NetworkAgent.setCacheDisabled(false, step5);
35 } 35 }
36 36
37 var resource; 37 var resource;
38 function step5() 38 function step5()
39 { 39 {
40 InspectorTest.addResult("Requesting content: "); 40 InspectorTest.addResult("Requesting content: ");
41 resource = InspectorTest.resourceMatchingURL("dynamic-script.js"); 41 resource = InspectorTest.resourceMatchingURL("dynamic-script.js");
42 resource.requestContent(step6); 42 resource.requestContent().then(step6);
43 } 43 }
44 44
45 function step6(content) 45 function step6(content)
46 { 46 {
47 InspectorTest.assertTrue(!!content, "No content available."); 47 InspectorTest.assertTrue(!!content, "No content available.");
48 InspectorTest.addResult("Resource url: " + resource.url); 48 InspectorTest.addResult("Resource url: " + resource.url);
49 InspectorTest.addResult("Resource content: " + content); 49 InspectorTest.addResult("Resource content: " + content);
50 InspectorTest.completeTest(); 50 InspectorTest.completeTest();
51 } 51 }
52 } 52 }
53 </script> 53 </script>
54 </head> 54 </head>
55 <body onload="runTest()"> 55 <body onload="runTest()">
56 <p>Tests resource content is correctly loaded if Resource.requestContent was cal led before network request was finished.</p> 56 <p>Tests resource content is correctly loaded if Resource.requestContent was cal led before network request was finished.</p>
57 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a> 57 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a>
58 </body> 58 </body>
59 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698