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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js

Issue 2758673002: [DevTools] Extract NetworkLog and HAREntry to a separate network_log module (Closed)
Patch Set: rebased Created 3 years, 9 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 // This goes before everything else to keep console message line number invarian t. 1 // This goes before everything else to keep console message line number invarian t.
2 var lastXHRIndex = 0; 2 var lastXHRIndex = 0;
3 function xhrLoadedCallback() 3 function xhrLoadedCallback()
4 { 4 {
5 // We need to make sure the console message text is unique so that we don't end up with repeat count update only. 5 // We need to make sure the console message text is unique so that we don't end up with repeat count update only.
6 console.log("XHR loaded: " + (++lastXHRIndex)); 6 console.log("XHR loaded: " + (++lastXHRIndex));
7 } 7 }
8 8
9 function makeSimpleXHR(method, url, async, callback) 9 function makeSimpleXHR(method, url, async, callback)
10 { 10 {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 InspectorTest.preloadPanel("network"); 57 InspectorTest.preloadPanel("network");
58 58
59 InspectorTest.recordNetwork = function() 59 InspectorTest.recordNetwork = function()
60 { 60 {
61 UI.panels.network._networkLogView.setRecording(true); 61 UI.panels.network._networkLogView.setRecording(true);
62 } 62 }
63 63
64 InspectorTest.networkRequests = function() 64 InspectorTest.networkRequests = function()
65 { 65 {
66 return SDK.networkLog.requests().slice(); 66 return NetworkLog.networkLog.requests().slice();
67 } 67 }
68 68
69 InspectorTest.dumpNetworkRequests = function() 69 InspectorTest.dumpNetworkRequests = function()
70 { 70 {
71 var requests = InspectorTest.networkRequests(); 71 var requests = InspectorTest.networkRequests();
72 requests.sort(function(a, b) {return a.url().localeCompare(b.url());}); 72 requests.sort(function(a, b) {return a.url().localeCompare(b.url());});
73 InspectorTest.addResult("resources count = " + requests.length); 73 InspectorTest.addResult("resources count = " + requests.length);
74 for (i = 0; i < requests.length; i++) 74 for (i = 0; i < requests.length; i++)
75 InspectorTest.addResult(requests[i].url()); 75 InspectorTest.addResult(requests[i].url());
76 } 76 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 version: "formatAsTypeName", 149 version: "formatAsTypeName",
150 wait: "formatAsTypeName", 150 wait: "formatAsTypeName",
151 _transferSize: "formatAsTypeName", 151 _transferSize: "formatAsTypeName",
152 _error: "skip" 152 _error: "skip"
153 }; 153 };
154 // addObject checks own properties only, so make a deep copy rather than use pro totype. 154 // addObject checks own properties only, so make a deep copy rather than use pro totype.
155 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto rTest.HARPropertyFormatters)); 155 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto rTest.HARPropertyFormatters));
156 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; 156 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName";
157 157
158 }; 158 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698