3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"editor-test.js"></script>
6 function codeSnippet() {
7 return document
.getElementById("codeSnippet").textContent
;
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
);
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
);
37 <body onload=
"runTest();">
39 This test checks text editor javascript formatting.
42 <pre id=
"codeSnippet">/**
52 for (var i =
0; i < n; ++i) {
53 for (var j =
0; j < n; ++j) {