summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/execCommand/default-paragraph-separator-expected.txt
blob: 83543f6dd1cc8b48211bd58ae520387627c11270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
PASS document.queryCommandEnabled('DefaultParagraphSeparator') is true
PASS document.queryCommandValue('DefaultParagraphSeparator') is "div"
document.execCommand('DefaultParagraphSeparator', false, 'p')
PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"
document.execCommand('DefaultParagraphSeparator', false, 'br')
PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"
document.execCommand('DefaultParagraphSeparator', false, 'invalid')
PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"

Creating paragraphs in the normal way.
document.execCommand('InsertText', false, 'a')
PASS div.innerHTML is "a"
document.execCommand('InsertText', false, '\n')
PASS div.innerHTML is "a<p><br></p>"
document.execCommand('InsertText', false, 'b')
PASS div.innerHTML is "a<p>b</p>"
document.execCommand('InsertText', false, '\n')
PASS div.innerHTML is "a<p>b</p><p><br></p>"
document.execCommand('Delete')
PASS div.innerHTML is "a<p>b</p>"
document.execCommand('Delete')
PASS div.innerHTML is "a<p><br></p>"
document.execCommand('Delete')
PASS div.innerHTML is "a"
document.execCommand('DefaultParagraphSeparator', false, 'div')
document.execCommand('InsertParagraph')
PASS div.innerHTML is "a<div><br></div>"
div.innerHTML = ''

Using the previous block as template for the new one.
document.execCommand('DefaultParagraphSeparator', false, 'p')
document.execCommand("InsertHTML", false, "<pre>a</pre>");
PASS div.innerHTML is "<pre>a</pre>"
document.execCommand('InsertText', false, 'b')
PASS div.innerHTML is "<pre>ab</pre>"
document.execCommand('InsertText', false, '\n')
PASS div.innerHTML is "<pre>ab</pre><pre><br></pre>"
document.execCommand('InsertText', false, 'c')
PASS div.innerHTML is "<pre>ab</pre><pre>c</pre>"
document.execCommand('DefaultParagraphSeparator', false, 'div')
document.execCommand('InsertText', false, '\n')
PASS div.innerHTML is "<pre>ab</pre><pre>c</pre><pre><br></pre>"
document.execCommand('Delete')
document.execCommand('InsertParagraph')
PASS div.innerHTML is "<pre>ab</pre><pre>c</pre><pre><br></pre>"

Breaking out of lists.
div.innerHTML = ''
document.execCommand('DefaultParagraphSeparator', false, 'p')
document.execCommand("InsertHTML", false, "<ul><li>a</li></ul>")
PASS div.innerHTML is "<ul><li>a</li></ul>"
document.execCommand('InsertParagraph')
document.execCommand('InsertParagraph')
PASS div.innerHTML is "<ul><li>a</li></ul><p><br></p>"

Breaking up nested elements.
div.innerHTML = ''
document.execCommand("InsertHTML", false, "<cite>a<cite>bc</cite></cite>")
window.getSelection().modify("move", "backward", "character")
document.execCommand('InsertParagraph')
PASS div.innerHTML is "<cite>a<cite>b</cite></cite><p><cite><cite>c</cite></cite></p>"
PASS successfullyParsed is true

TEST COMPLETE