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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/ui-source-code.html

Issue 1418293002: Devtools: Extensible mime typing, mime typing by file name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add url function to mock project Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/common/ResourceType.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 4
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var MockProject = function() {} 9 var MockProject = function() {}
10 MockProject.prototype.requestFileContent = function(uri, callback) 10 MockProject.prototype.requestFileContent = function(uri, callback)
11 { 11 {
12 InspectorTest.addResult("Content is requested from SourceCodeProvider.") ; 12 InspectorTest.addResult("Content is requested from SourceCodeProvider.") ;
13 setTimeout(callback.bind(null, "var x = 0;"), 0); 13 setTimeout(callback.bind(null, "var x = 0;"), 0);
14 } 14 }
15 MockProject.prototype.isServiceProject = function() { return false; }; 15 MockProject.prototype.isServiceProject = function() { return false; };
16 MockProject.prototype.type = function() { return WebInspector.projectTypes.D ebugger; } 16 MockProject.prototype.type = function() { return WebInspector.projectTypes.D ebugger; }
17 MockProject.prototype.url = function() { return "mock://debugger-ui/"; }
17 18
18 InspectorTest.runTestSuite([ 19 InspectorTest.runTestSuite([
19 function testUISourceCode(next) 20 function testUISourceCode(next)
20 { 21 {
21 var uiSourceCode = new WebInspector.UISourceCode(new MockProject(), "parentPath", "name", "originURL", WebInspector.resourceTypes.Script); 22 var uiSourceCode = new WebInspector.UISourceCode(new MockProject(), "parentPath", "name", "originURL", WebInspector.resourceTypes.Script);
22 function didRequestContent(callNumber, content) 23 function didRequestContent(callNumber, content)
23 { 24 {
24 InspectorTest.addResult("Callback " + callNumber + " is invoked. "); 25 InspectorTest.addResult("Callback " + callNumber + " is invoked. ");
25 InspectorTest.assertEquals("text/javascript", WebInspector.Sourc esView.uiSourceCodeHighlighterType(uiSourceCode)); 26 InspectorTest.assertEquals("text/javascript", WebInspector.Sourc esView.uiSourceCodeHighlighterType(uiSourceCode));
26 InspectorTest.assertEquals("var x = 0;", content); 27 InspectorTest.assertEquals("var x = 0;", content);
(...skipping 17 matching lines...) Expand all
44 }; 45 };
45 46
46 </script> 47 </script>
47 48
48 </head> 49 </head>
49 50
50 <body onload="runTest()"> 51 <body onload="runTest()">
51 <p>Tests UISourceCode class.</p> 52 <p>Tests UISourceCode class.</p>
52 </body> 53 </body>
53 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/common/ResourceType.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698