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

Side by Side Diff: LayoutTests/http/tests/inspector/network/json-preview.html

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 // force the loading of NetworkPanel code. 8 // force the loading of NetworkPanel code.
9 var networkPanel = WebInspector.inspectorView.showPanel("network"); 9 var networkPanel = WebInspector.inspectorView.showPanel("network");
10 10
11 function createNetworkRequestWithJSONMIMEType(type) 11 function createNetworkRequestWithJSONMIMEType(type)
12 { 12 {
13 InspectorTest.addResult("Creating a NetworkRequest with type: " + type); 13 InspectorTest.addResult("Creating a NetworkRequest with type: " + type);
14 var request = new WebInspector.NetworkRequest(WebInspector.targetManager .activeTarget(), 0, 'http://localhost'); 14 var request = new WebInspector.NetworkRequest(WebInspector.targetManager .mainTarget(), 0, 'http://localhost');
15 request.mimeType = type; 15 request.mimeType = type;
16 request._content = '{"number": 42}'; 16 request._content = '{"number": 42}';
17 return request; 17 return request;
18 } 18 }
19 19
20 function testPreviewer(request) 20 function testPreviewer(request)
21 { 21 {
22 var previewView = new WebInspector.RequestPreviewView(request, null); 22 var previewView = new WebInspector.RequestPreviewView(request, null);
23 var previewer = previewView._createPreviewView(); 23 var previewer = previewView._createPreviewView();
24 InspectorTest.addResult("Its previewer is the JSON previewer: " + (previ ewer && previewer instanceof WebInspector.RequestJSONView)); 24 InspectorTest.addResult("Its previewer is the JSON previewer: " + (previ ewer && previewer instanceof WebInspector.RequestJSONView));
(...skipping 15 matching lines...) Expand all
40 testType("application/vnd.document+json", next); 40 testType("application/vnd.document+json", next);
41 }, 41 },
42 ]); 42 ]);
43 } 43 }
44 </script> 44 </script>
45 </head> 45 </head>
46 <body onload="runTest()"> 46 <body onload="runTest()">
47 <p>Tests that resources with JSON MIME types are previewed with the JSON viewer. </p> 47 <p>Tests that resources with JSON MIME types are previewed with the JSON viewer. </p>
48 </body> 48 </body>
49 </html> 49 </html>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | LayoutTests/http/tests/inspector/network/request-name-path.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698