summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/selection/move-between-lines-of-different-editabilities.html
blob: 19afbf16949878c122ca344b787e75192674c80b (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>
<body>
<style>

div[contenteditable=false] {
    background: red;
}

</style>
<div id="test" contenteditable=true>
Line 1 editable<div contenteditable=false>Uneditable div 1</div>
Line 2 editable<div contenteditable=false>Uneditable div 2</div>
Line 3 editable</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script>

Markup.description('This test moves caret between lines of different editabilities.')

document.getElementById('test').focus();

for (var i = 0; i < 6; i++)
    execMoveSelectionForwardByCharacterCommand();

if (window.layoutTestController)
    layoutTestController.dumpEditingCallbacks();

Markup.dump('test', 'Initial condition');
for (var i = 0; i < 3; i++) {
    execMoveSelectionForwardByLineCommand();
    Markup.dump('test', 'After moving forward by line');
}

</script>
</body>
</html>