Web Inspector: Don't include error message text in the editor buffer.
[WebKit-https.git] / LayoutTests / inspector / editor / text-editor-type-over-decoration.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="editor-test.js?foo=143"></script>
5 <script>
6
7 function test()
8 {
9     var textEditor = InspectorTest.createTestEditor(10);
10     var textModel = textEditor._textModel;
11
12     InspectorTest.dumpEditorChunks(textEditor);
13     var decorationElement = document.createElement("span");
14     decorationElement.textContent = "Decoration content";
15     textEditor.addDecoration(5, decorationElement);
16     InspectorTest.dumpEditorDOM(textEditor);
17
18     // Insert Enter before the decoration
19     var lineRowElement = InspectorTest.getLineElement(textEditor, 5);
20     lineRowElement.parentElement.insertBefore(document.createTextNode("a"), lineRowElement);
21     textEditor._mainPanel._applyDomUpdates({start:4, end:5});
22     InspectorTest.dumpEditorDOM(textEditor);
23     InspectorTest.completeTest();
24 }
25
26 </script>
27 </head>
28
29 <body onload="runTest()">
30 <p>
31 This test checks that typing over the decoration does not collect decoration text as a part of damaged DOM.
32 </p>
33
34 </body>
35 </html>