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

Side by Side Diff: LayoutTests/http/tests/inspector/network/load-resource-for-frontend.html

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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> 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 test() 6 function test()
7 { 7 {
8 var loggedHeaders = { 8 var loggedHeaders = {
9 "cache-control": true, 9 "cache-control": true,
10 "expires": true, 10 "expires": true,
11 "last-modified": true, 11 "last-modified": true,
12 "pragma": true 12 "pragma": true
13 }; 13 };
14 function testLoadForURL(url, headers, next) 14 function testLoadForURL(url, headers, next)
15 { 15 {
16 InspectorTest.recordNetwork(); 16 InspectorTest.recordNetwork();
17 InspectorTest.addResult("Loading resource from " + url); 17 InspectorTest.addResult("Loading resource from " + url);
18 InspectorTest.NetworkAgent.loadResourceForFrontend(WebInspector.resource TreeModel.mainFrame.id, url, headers, callback); 18 InspectorTest.NetworkAgent.loadResourceForFrontend(InspectorTest.resourc eTreeModel.mainFrame.id, url, headers, callback);
19 19
20 function callback(error, statusCode, headers, content) 20 function callback(error, statusCode, headers, content)
21 { 21 {
22 if (error) 22 if (error)
23 InspectorTest.addResult("Failed: " + error); 23 InspectorTest.addResult("Failed: " + error);
24 else { 24 else {
25 InspectorTest.addResult("Success: " + statusCode); 25 InspectorTest.addResult("Success: " + statusCode);
26 var headersArray = []; 26 var headersArray = [];
27 for (var name in headers) { 27 for (var name in headers) {
28 var nameLower = name.toLowerCase(); 28 var nameLower = name.toLowerCase();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 testLoadForURL("http://127.0.0.1:8000/inspector/network/resource s/print-cookie.php", undefined, next); 80 testLoadForURL("http://127.0.0.1:8000/inspector/network/resource s/print-cookie.php", undefined, next);
81 } 81 }
82 }, 82 },
83 ]); 83 ]);
84 } 84 }
85 </script> 85 </script>
86 </head> 86 </head>
87 <body onload="runTest()"> 87 <body onload="runTest()">
88 </body> 88 </body>
89 </html> 89 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698