4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
5 <link rel=
"stylesheet" type=
"text/css" href=
"resources/extend-selection.css" />
6 <script src=
"resources/extend-selection.js"></script>
9 <pre id=
"console"></pre>
11 function runSelectionTestsWithGranularityForEnclosingBlock(testNodes
, granularity
)
13 for (var i
= 0; i
< testNodes
.length
; ++i
) {
14 getSelection().collapse(testNodes
[i
], 0);
16 log("Test " + (i
+ 1) + ", LTR:\n");
17 log(" Extending right: ");
18 extendAndLogSelectionWithinBlock("right", granularity
, "win");
20 log(" Extending left: ");
21 extendAndLogSelectionWithinBlock("left", granularity
, "win");
26 internals
.settings
.setEditingBehavior("win");
27 log("\n\n\nExtending by character\n");
28 runSelectionTestsWithGranularityForEnclosingBlock(createEnclosingBlockNodes(), "character");
30 log("\n\n\n\n\nExtending by word\n");
31 runSelectionTestsWithGranularityForEnclosingBlock(createEnclosingBlockNodes(), "word");