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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/sources/ui-source-code-highlight.php

Issue 2889013002: DevTools: introduce uiSourceCode.mimeType() method (Closed)
Patch Set: address comments Created 3 years, 7 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/inspector-test.js"></script> 3 <script src="/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() 6 function test()
7 { 7 {
8 var uiSourceCodes = Workspace.workspace.uiSourceCodes(); 8 var uiSourceCodes = Workspace.workspace.uiSourceCodes();
9 9
10 for (var i = 0; i < uiSourceCodes.length; ++i) { 10 for (var i = 0; i < uiSourceCodes.length; ++i) {
11 var uiSourceCode = uiSourceCodes[i]; 11 var uiSourceCode = uiSourceCodes[i];
12 if (!/.php$/.test(uiSourceCode.url())) 12 if (!/.php$/.test(uiSourceCode.url()))
13 continue; 13 continue;
14 if (uiSourceCode.project().type() !== Workspace.projectTypes.Network) 14 if (uiSourceCode.project().type() !== Workspace.projectTypes.Network)
15 continue; 15 continue;
16 InspectorTest.addResult("Highlight mimeType: " + Bindings.NetworkProject .uiSourceCodeMimeType(uiSourceCode)); 16 InspectorTest.addResult("Highlight mimeType: " + uiSourceCode.mimeType() );
17 InspectorTest.completeTest(); 17 InspectorTest.completeTest();
18 return; 18 return;
19 } 19 }
20 20
21 InspectorTest.addResult("Failed to find source code with .php extension."); 21 InspectorTest.addResult("Failed to find source code with .php extension.");
22 InspectorTest.completeTest(); 22 InspectorTest.completeTest();
23 } 23 }
24 24
25 </script> 25 </script>
26 </head> 26 </head>
27 27
28 <body onload="runTest()"> 28 <body onload="runTest()">
29 <p> 29 <p>
30 Tests that network-loaded UISourceCodes are highlighted according to their HTTP header mime type 30 Tests that network-loaded UISourceCodes are highlighted according to their HTTP header mime type
31 instead of their extension. crbug.com/411863 31 instead of their extension. crbug.com/411863
32 </p> 32 </p>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698