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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.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 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 function createNetworkRequestWithJSONMIMEType(type) 8 function createNetworkRequestWithJSONMIMEType(type)
9 { 9 {
10 InspectorTest.addResult("Creating a NetworkRequest with type: " + type); 10 InspectorTest.addResult("Creating a NetworkRequest with type: " + type);
11 var request = new SDK.NetworkRequest(SDK.targetManager.mainTarget(), 0, 'http://localhost'); 11 var request = new SDK.NetworkRequest(0, 'http://localhost');
12 request.mimeType = type; 12 request.mimeType = type;
13 request._contentData = Promise.resolve({ error: null, content: '{"number ": 42}', encoded: false }); 13 request._contentData = Promise.resolve({ error: null, content: '{"number ": 42}', encoded: false });
14 return request; 14 return request;
15 } 15 }
16 16
17 async function testPreviewer(request) 17 async function testPreviewer(request)
18 { 18 {
19 var previewView = new Network.RequestPreviewView(request, null); 19 var previewView = new Network.RequestPreviewView(request, null);
20 var previewerPromise = InspectorTest.addSnifferPromise(previewView, "_pr eviewViewHandledForTest"); 20 var previewerPromise = InspectorTest.addSnifferPromise(previewView, "_pr eviewViewHandledForTest");
21 previewView.wasShown(); 21 previewView.wasShown();
(...skipping 17 matching lines...) Expand all
39 testType("application/vnd.document+json", next); 39 testType("application/vnd.document+json", next);
40 }, 40 },
41 ]); 41 ]);
42 } 42 }
43 </script> 43 </script>
44 </head> 44 </head>
45 <body onload="runTest()"> 45 <body onload="runTest()">
46 <p>Tests that resources with JSON MIME types are previewed with the JSON viewer. </p> 46 <p>Tests that resources with JSON MIME types are previewed with the JSON viewer. </p>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698