| 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 codeSnippet() { | 6 function codeSnippet() { |
| 7 return document.getElementById("codeSnippet").textContent; | 7 return document.getElementById("codeSnippet").textContent; |
| 8 } | 8 } |
| 9 | 9 |
| 10 function test() | 10 function test() |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 return innerDumpAndNext; | 32 return innerDumpAndNext; |
| 33 } | 33 } |
| 34 | 34 |
| 35 var testSuite = [ | 35 var testSuite = [ |
| 36 function testSimpleCollapsedBlockExpanding(next) | 36 function testSimpleCollapsedBlockExpanding(next) |
| 37 { | 37 { |
| 38 textEditor.setText(codeSnippetText); | 38 textEditor.setText(codeSnippetText); |
| 39 InspectorTest.setLineSelections(textEditor, [ | 39 InspectorTest.setLineSelections(textEditor, [ |
| 40 {line: 0, column: 1} | 40 {line: 0, column: 1} |
| 41 ]); | 41 ]); |
| 42 InspectorTest.fakeKeyEvent(textEditor, "enter", [], dumpAndNext(next
)); | 42 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], dumpAndNext(next
)); |
| 43 }, | 43 }, |
| 44 | 44 |
| 45 function testMulticursorCollapsedBlockExpanding(next) | 45 function testMulticursorCollapsedBlockExpanding(next) |
| 46 { | 46 { |
| 47 textEditor.setText(codeSnippetText); | 47 textEditor.setText(codeSnippetText); |
| 48 InspectorTest.setLineSelections(textEditor, [ | 48 InspectorTest.setLineSelections(textEditor, [ |
| 49 {line: 0, column: 1}, | 49 {line: 0, column: 1}, |
| 50 {line: 0, column: 4}, | 50 {line: 0, column: 4}, |
| 51 {line: 1, column: 3} | 51 {line: 1, column: 3} |
| 52 ]); | 52 ]); |
| 53 InspectorTest.fakeKeyEvent(textEditor, "enter", [], dumpAndNext(next
)); | 53 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], dumpAndNext(next
)); |
| 54 }, | 54 }, |
| 55 | 55 |
| 56 function testMulticursorCollapsedBlockNotExpanding(next) | 56 function testMulticursorCollapsedBlockNotExpanding(next) |
| 57 { | 57 { |
| 58 textEditor.setText(codeSnippetText); | 58 textEditor.setText(codeSnippetText); |
| 59 InspectorTest.setLineSelections(textEditor, [ | 59 InspectorTest.setLineSelections(textEditor, [ |
| 60 {line: 0, column: 1}, | 60 {line: 0, column: 1}, |
| 61 {line: 1, column: 2} | 61 {line: 1, column: 2} |
| 62 ]); | 62 ]); |
| 63 InspectorTest.fakeKeyEvent(textEditor, "enter", [], dumpAndNext(next
)); | 63 InspectorTest.fakeKeyEvent(textEditor, "Enter", [], dumpAndNext(next
)); |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 function testSingleCursorClosingBracketIndent(next) | 66 function testSingleCursorClosingBracketIndent(next) |
| 67 { | 67 { |
| 68 textEditor.setText(codeSnippetText); | 68 textEditor.setText(codeSnippetText); |
| 69 InspectorTest.setLineSelections(textEditor, [ | 69 InspectorTest.setLineSelections(textEditor, [ |
| 70 {line: 3, column: 0} | 70 {line: 3, column: 0} |
| 71 ]); | 71 ]); |
| 72 InspectorTest.fakeKeyEvent(textEditor, "}", [], dumpAndNext(next)); | 72 InspectorTest.fakeKeyEvent(textEditor, "}", [], dumpAndNext(next)); |
| 73 }, | 73 }, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 {} {} | 106 {} {} |
| 107 {} | 107 {} |
| 108 { | 108 { |
| 109 | 109 |
| 110 { | 110 { |
| 111 | 111 |
| 112 </pre> | 112 </pre> |
| 113 | 113 |
| 114 </body> | 114 </body> |
| 115 </html> | 115 </html> |
| OLD | NEW |