Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / editor / text-editor-formatter.html
blob959623912bcb9f57ba5dafc068ab7539719f3886
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 codeSnippet() {
7 return document.getElementById("codeSnippet").textContent;
10 function test()
12 var textEditor = InspectorTest.createTestEditor();
13 textEditor.setMimeType("text/javascript");
14 textEditor.setReadOnly(false);
15 textEditor.element.focus();
17 function step2(result)
19 var codeLines = result.value;
20 InspectorTest.typeIn(textEditor, codeLines, step3);
23 function step3()
25 InspectorTest.addResult("============ editor contents start ============");
26 InspectorTest.addResult(textEditor.text().replace(/ /g, "."));
27 InspectorTest.addResult("============ editor contents end ============");
28 InspectorTest.completeTest();
31 InspectorTest.evaluateInPage("codeSnippet();", step2);
34 </script>
35 </head>
37 <body onload="runTest();">
38 <p>
39 This test checks text editor javascript formatting.
40 </p>
42 <pre id="codeSnippet">/**
43 * Multi-line comment
46 function foo(n) {
47 // one-line comment
48 function bar() {
49 return 42;D
51 var sum = 0;
52 for (var i = 0; i < n; ++i) {
53 for (var j = 0; j < n; ++j) {
54 sum += i + j;DD
57 if (sum > 1000) {
58 while (sum > 0) {
59 --sum;DDD
60 </pre>
62 </body>
63 </html>