OLD | NEW |
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 <script src="editor-test.js"></script> | 4 <script src="editor-test.js"></script> |
5 <script> | 5 <script> |
6 function test() | 6 function test() |
7 { | 7 { |
8 var mimeType = "text/x-php"; | 8 var mimeType = "text/x-php"; |
9 var textEditor = InspectorTest.createTestEditor(); | 9 var textEditor = InspectorTest.createTestEditor(); |
10 InspectorTest.addSniffer(textEditor, "_mimeTypeModesLoadedForTest", onModesL
oaded); | 10 textEditor.setMimeType(mimeType).then(onModesLoaded); |
11 textEditor.setMimeType(mimeType); | |
12 | 11 |
13 function onModesLoaded() | 12 function onModesLoaded() |
14 { | 13 { |
15 InspectorTest.addResult("Mode loaded: " + !!CodeMirror.mimeModes[mimeTyp
e]); | 14 InspectorTest.addResult("Mode loaded: " + !!CodeMirror.mimeModes[mimeTyp
e]); |
16 InspectorTest.completeTest(); | 15 InspectorTest.completeTest(); |
17 } | 16 } |
18 } | 17 } |
19 | 18 |
20 </script> | 19 </script> |
21 </head> | 20 </head> |
22 | 21 |
23 <body onload="runTest()"> | 22 <body onload="runTest()"> |
24 <p> | 23 <p> |
25 Tests that php highlighter loads successfully. | 24 Tests that php highlighter loads successfully. |
26 </p> | 25 </p> |
27 </body> | 26 </body> |
28 </html> | 27 </html> |
OLD | NEW |