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

Side by Side Diff: LayoutTests/http/tests/inspector/network/network-initiator-from-console.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 var test = function() 6 var test = function()
7 { 7 {
8 InspectorTest.reloadPage(step1); 8 InspectorTest.reloadPage(step1);
9 9
10 function findRequestByURL(url) 10 function findRequestByURL(url)
11 { 11 {
12 var requests = InspectorTest.networkRequests(); 12 var requests = InspectorTest.networkRequests();
13 for (var i = 0; i < requests.length; ++i) { 13 for (var i = 0; i < requests.length; ++i) {
14 if (url.test(requests[i].url)) 14 if (url.test(requests[i].url))
15 return requests[i]; 15 return requests[i];
16 } 16 }
17 } 17 }
18 18
19 function step1() 19 function step1()
20 { 20 {
21 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager .EventTypes.RequestStarted, onRequest); 21 InspectorTest.networkManager.addEventListener(WebInspector.NetworkManage r.EventTypes.RequestStarted, onRequest);
22 var str = ""; 22 var str = "";
23 str += "var s = document.createElement(\"script\");"; 23 str += "var s = document.createElement(\"script\");";
24 str += "s.src = \"resources/silent_script.js\";"; 24 str += "s.src = \"resources/silent_script.js\";";
25 str += "document.head.appendChild(s);"; 25 str += "document.head.appendChild(s);";
26 WebInspector.context.flavor(WebInspector.ExecutionContext).evaluate(str, "console", true, undefined, undefined, undefined, function(){}); 26 WebInspector.context.flavor(WebInspector.ExecutionContext).evaluate(str, "console", true, undefined, undefined, undefined, function(){});
27 } 27 }
28 28
29 function onRequest(event) 29 function onRequest(event)
30 { 30 {
31 var request = event.data; 31 var request = event.data;
(...skipping 10 matching lines...) Expand all
42 } 42 }
43 } 43 }
44 44
45 </script> 45 </script>
46 </head> 46 </head>
47 <body onload="runTest()"> 47 <body onload="runTest()">
48 <p>Tests that there is no javascript error when console evaluation causes resour ce loading.</p> 48 <p>Tests that there is no javascript error when console evaluation causes resour ce loading.</p>
49 <a href="https://bugs.webkit.org/show_bug.cgi?id=65466">Bug 65466</a> 49 <a href="https://bugs.webkit.org/show_bug.cgi?id=65466">Bug 65466</a>
50 </body> 50 </body>
51 </html> 51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698