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>
12 internals
.settings
.setEditingBehavior("mac");
14 function runSelectionTestsWithGranularityForEnclosingBlock(testNodes
, granularity
)
16 for (var i
= 0; i
< testNodes
.length
; ++i
) {
17 getSelection().collapse(testNodes
[i
], 0);
19 log("Test " + (i
+ 1) + ", LTR:\n");
20 log(" Extending right: ");
21 extendAndLogSelectionWithinBlock("right", granularity
, "mac");
23 log(" Extending left: ");
24 extendAndLogSelectionWithinBlock("left", granularity
, "mac");
28 log("\n\n\nExtending by character\n");
29 runSelectionTestsWithGranularityForEnclosingBlock(createEnclosingBlockNodes(), "character");
31 log("\n\n\n\n\nExtending by word\n");
32 runSelectionTestsWithGranularityForEnclosingBlock(createEnclosingBlockNodes(), "word");