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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-while-loading.html

Issue 2626553002: [Devtools][Code health] Changed NetworkRequest.url to proper getter/setter (Closed)
Patch Set: changes Created 3 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 <script> 6 <script>
7 function loadStylesheet() 7 function loadStylesheet()
8 { 8 {
9 var styleElement = document.createElement("link"); 9 var styleElement = document.createElement("link");
10 styleElement.rel = "stylesheet"; 10 styleElement.rel = "stylesheet";
11 styleElement.href = "resources/styles-initial.css"; 11 styleElement.href = "resources/styles-initial.css";
12 document.head.appendChild(styleElement); 12 document.head.appendChild(styleElement);
13 } 13 }
14 14
15 function test() 15 function test()
16 { 16 {
17 InspectorTest.addSniffer(SDK.ResourceTreeFrame.prototype, "_addRequest", req uestAdded, true); 17 InspectorTest.addSniffer(SDK.ResourceTreeFrame.prototype, "_addRequest", req uestAdded, true);
18 InspectorTest.addSniffer(InspectorTest.PageAgent, "getResourceContent", page AgentGetResourceContentCalled, true); 18 InspectorTest.addSniffer(InspectorTest.PageAgent, "getResourceContent", page AgentGetResourceContentCalled, true);
19 InspectorTest.evaluateInPage("loadStylesheet()"); 19 InspectorTest.evaluateInPage("loadStylesheet()");
20 var contentWasRequested = false; 20 var contentWasRequested = false;
21 var resource; 21 var resource;
22 22
23 function requestAdded(request) 23 function requestAdded(request)
24 { 24 {
25 if (request.url.indexOf("styles-initial") === -1) 25 if (request.url().indexOf("styles-initial") === -1)
26 return; 26 return;
27 resource = InspectorTest.resourceMatchingURL("styles-initial"); 27 resource = InspectorTest.resourceMatchingURL("styles-initial");
28 if (!resource || !resource.request || contentWasRequested) { 28 if (!resource || !resource.request || contentWasRequested) {
29 InspectorTest.addResult("Cannot find resource"); 29 InspectorTest.addResult("Cannot find resource");
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 } 31 }
32 resource.requestContent().then(contentLoaded); 32 resource.requestContent().then(contentLoaded);
33 contentWasRequested = true; 33 contentWasRequested = true;
34 } 34 }
35 35
(...skipping 12 matching lines...) Expand all
48 InspectorTest.completeTest(); 48 InspectorTest.completeTest();
49 } 49 }
50 } 50 }
51 </script> 51 </script>
52 </head> 52 </head>
53 <body onload="runTest()"> 53 <body onload="runTest()">
54 <p>Tests resource content is correctly loaded if Resource.requestContent was cal led before network request was finished.</p> 54 <p>Tests resource content is correctly loaded if Resource.requestContent was cal led before network request was finished.</p>
55 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a> 55 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a>
56 </body> 56 </body>
57 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698