summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/pasteboard/paste-blockquote-3.html
blob: 873f46e6198674d803e0d919bf7dea6b44832641 (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
<!DOCTYPE html>
<html>
<head>
<style>
blockquote {
    color: blue;
    border-left: 2px solid blue;
    margin: 0px;
    padding: 0 0 0 20px;
}
</style>
</head>
<body>
<div id="div" contenteditable="true">This should not be blockquoted. This should not be blockquoted.</div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.internals)
    internals.settings.setEditingBehavior('mac');

Markup.description("This tests pasting a blockquote into the middle of a paragraph.");

var sel = window.getSelection();
var div = document.getElementById("div");

sel.collapse(div, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "character");
document.execCommand("InsertHTML", false, "<blockquote type='cite'>&nbsp;This should not be blockquoted.<br>This should be blockquoted.<br>This should not be blockquoted.</blockquote>");

Markup.dump('div');
</script>
</body>
</html>