| 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 textEditor.setMimeType(mimeType).then(onModesLoaded); | 10 InspectorTest.addSnifferPromise(SourceFrame.SourcesTextEditor.prototype, "re
writeMimeType").then(onModesLoaded); |
| 11 | 11 textEditor.setMimeType(mimeType); |
| 12 function onModesLoaded() | 12 function onModesLoaded() |
| 13 { | 13 { |
| 14 InspectorTest.addResult("Mode loaded: " + !!CodeMirror.mimeModes[mimeTyp
e]); | 14 InspectorTest.addResult("Mode loaded: " + !!CodeMirror.mimeModes[mimeTyp
e]); |
| 15 InspectorTest.completeTest(); | 15 InspectorTest.completeTest(); |
| 16 } | 16 } |
| 17 } | 17 } |
| 18 | 18 |
| 19 </script> | 19 </script> |
| 20 </head> | 20 </head> |
| 21 | 21 |
| 22 <body onload="runTest()"> | 22 <body onload="runTest()"> |
| 23 <p> | 23 <p> |
| 24 Tests that php highlighter loads successfully. | 24 Tests that php highlighter loads successfully. |
| 25 </p> | 25 </p> |
| 26 </body> | 26 </body> |
| 27 </html> | 27 </html> |
| OLD | NEW |