3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="editor-test.js"></script>
9 var textEditor = InspectorTest.createTestEditor();
10 textEditor.setMimeType("text/javascript");
11 textEditor.setReadOnly(false);
12 textEditor.element.focus();
14 function clearEditor()
16 textEditor.setText("");
17 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 0));
20 InspectorTest.runTestSuite([
21 function testTypeBraceSequence(next)
24 InspectorTest.typeIn(textEditor, "({[", onTypedIn);
27 InspectorTest.dumpTextWithSelection(textEditor);
32 function testBraceOverride(next)
35 InspectorTest.typeIn(textEditor, "({[]})", onTypedIn);
38 InspectorTest.dumpTextWithSelection(textEditor);
43 function testQuotesToCloseStringLiterals(next)
45 textEditor.setText("'Hello");
46 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 6));
47 InspectorTest.typeIn(textEditor, "\"'", onTypedIn);
50 InspectorTest.dumpTextWithSelection(textEditor);
60 <body onload="runTest();">
62 This test checks text editor smart braces functionality.