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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/request-name-path.html

Issue 2921963002: [Devtools] Removed NetworkRequest dependency on NetworkManager (Closed)
Patch Set: Merge branch 'REMOVE_REDIRECTS_REBASE' into REMOVE_MANAGER_DEPENDENCY Created 3 years, 6 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> 4 <script>
5 function test() 5 function test()
6 { 6 {
7 /** 7 /**
8 * @param {string} url 8 * @param {string} url
9 * @param {string=} targetUrl 9 * @param {string=} targetUrl
10 */ 10 */
11 function createNetworkRequestForURLAndDumpNameAndPath(url, targetUrl) 11 function createNetworkRequestForURLAndDumpNameAndPath(url, targetUrl)
12 { 12 {
13 var mainTarget = SDK.targetManager.mainTarget(); 13 var mainTarget = SDK.targetManager.mainTarget();
14 var currentTargetURL = mainTarget.inspectedURL(); 14 var currentTargetURL = mainTarget.inspectedURL();
15 var dispatcher = InspectorTest.networkManager._dispatcher;
15 if (targetUrl) 16 if (targetUrl)
16 mainTarget.setInspectedURL(targetUrl); 17 mainTarget.setInspectedURL(targetUrl);
17 InspectorTest.addResult("Dumping request name and path for url: " + url) ; 18 InspectorTest.addResult("Dumping request name and path for url: " + url) ;
18 var request = new SDK.NetworkRequest(InspectorTest.networkManager, 0, ur l); 19 var request = dispatcher._createNetworkRequest(0, "", "", url);
19 InspectorTest.addResult(" name = " + request.name()); 20 InspectorTest.addResult(" name = " + request.name());
20 InspectorTest.addResult(" path = " + request.path()); 21 InspectorTest.addResult(" path = " + request.path());
21 InspectorTest.addResult(" targetUrl = " + (targetUrl ? targetUrl : cu rrentTargetURL)); 22 InspectorTest.addResult(" targetUrl = " + (targetUrl ? targetUrl : cu rrentTargetURL));
22 if (targetUrl !== currentTargetURL) 23 if (targetUrl !== currentTargetURL)
23 mainTarget.setInspectedURL(currentTargetURL); 24 mainTarget.setInspectedURL(currentTargetURL);
24 } 25 }
25 26
26 // Save the target URL to ensure test works well with other tests. 27 // Save the target URL to ensure test works well with other tests.
27 var mainTarget = SDK.targetManager.mainTarget(); 28 var mainTarget = SDK.targetManager.mainTarget();
28 var originalTargetURL = mainTarget.inspectedURL(); 29 var originalTargetURL = mainTarget.inspectedURL();
(...skipping 28 matching lines...) Expand all
57 InspectorTest.completeTest(); 58 InspectorTest.completeTest();
58 } 59 }
59 60
60 </script> 61 </script>
61 </head> 62 </head>
62 <body onload="runTest()"> 63 <body onload="runTest()">
63 <p>Tests name() and path() methods of NetworkRequest.</p> 64 <p>Tests name() and path() methods of NetworkRequest.</p>
64 <a href="https://bugs.webkit.org/show_bug.cgi?id=101064">Bug 101064</a> 65 <a href="https://bugs.webkit.org/show_bug.cgi?id=101064">Bug 101064</a>
65 </body> 66 </body>
66 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698