Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / editor / text-editor-smart-braces.html
blobb1addf1d6d22b789d683b2326dee25ee07ec090a
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="editor-test.js"></script>
5 <script>
6 function test()
8 var textEditor = InspectorTest.createTestEditor();
9 textEditor.setMimeType("text/javascript");
10 textEditor.setReadOnly(false);
11 textEditor.element.focus();
13 function clearEditor()
15 textEditor.setText("");
16 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 0));
19 InspectorTest.runTestSuite([
20 function testTypeBraceSequence(next)
22 clearEditor();
23 InspectorTest.typeIn(textEditor, "({[", onTypedIn);
24 function onTypedIn()
26 InspectorTest.dumpTextWithSelection(textEditor);
27 next();
31 function testBraceOverride(next)
33 clearEditor();
34 InspectorTest.typeIn(textEditor, "({[]})", onTypedIn);
35 function onTypedIn()
37 InspectorTest.dumpTextWithSelection(textEditor);
38 next();
42 function testQuotesToCloseStringLiterals(next)
44 textEditor.setText("'Hello");
45 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 6));
46 InspectorTest.typeIn(textEditor, "\"'", onTypedIn);
47 function onTypedIn()
49 InspectorTest.dumpTextWithSelection(textEditor);
50 next();
54 function testQuotesToCloseStringLiteralInsideLine(next)
56 textEditor.setText("console.log(\"information\");");
57 textEditor.setSelection(WebInspector.TextRange.createFromLocation(0, 24));
58 InspectorTest.typeIn(textEditor, "\"", onTypedIn);
59 function onTypedIn()
61 InspectorTest.dumpTextWithSelection(textEditor);
62 next();
65 ]);
68 </script>
69 </head>
71 <body onload="runTest();">
72 <p>
73 This test checks text editor smart braces functionality.
74 </p>
76 </body>
77 </html>