| 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 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 var text = [ | 9 var text = [ |
| 10 "function foo(a, b) {", | 10 "function foo(a, b) {", |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 var column = columns[j]; | 28 var column = columns[j]; |
| 29 InspectorTest.addResult("Column #" + column + " (char '" + text[
i].charAt(column) + "') - token: " + JSON.stringify(textEditor.tokenAtTextPositi
on(i, column))); | 29 InspectorTest.addResult("Column #" + column + " (char '" + text[
i].charAt(column) + "') - token: " + JSON.stringify(textEditor.tokenAtTextPositi
on(i, column))); |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 InspectorTest.runTestSuite([ | 34 InspectorTest.runTestSuite([ |
| 35 function testHighlightedText(next) | 35 function testHighlightedText(next) |
| 36 { | 36 { |
| 37 var textEditor = InspectorTest.createTestEditor(); | 37 var textEditor = InspectorTest.createTestEditor(); |
| 38 textEditor.setMimeType("text/javascript"); | 38 textEditor.setMimeType("text/javascript").then(step1); |
| 39 textEditor.setText(text.join("\n")); | 39 function step1() |
| 40 testTokenAtPosition(textEditor); | 40 { |
| 41 next(); | 41 textEditor.setText(text.join("\n")); |
| 42 testTokenAtPosition(textEditor); |
| 43 next(); |
| 44 } |
| 42 }, | 45 }, |
| 43 ]); | 46 ]); |
| 44 } | 47 } |
| 45 | 48 |
| 46 </script> | 49 </script> |
| 47 </head> | 50 </head> |
| 48 | 51 |
| 49 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 50 <p> | 53 <p> |
| 51 Test editor tokenAtTextPosition method. | 54 Test editor tokenAtTextPosition method. |
| 52 </p> | 55 </p> |
| 53 </body> | 56 </body> |
| 54 </html> | 57 </html> |
| OLD | NEW |