Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: LayoutTests/editing/selection/resources/extend-selection.js

Issue 14930006: Ctrl+Shift+Right in Windows should select the spacing after the word (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added expectations for chromium-mac for delete-cell-contents-win.html Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/selection/resources/extend-selection.js
diff --git a/LayoutTests/editing/selection/resources/extend-selection.js b/LayoutTests/editing/selection/resources/extend-selection.js
index 382acfc18ddcfa2d713d36315d7b184d9442e234..f7c29e34a929af53339bb0eae1b02faa228b1112 100644
--- a/LayoutTests/editing/selection/resources/extend-selection.js
+++ b/LayoutTests/editing/selection/resources/extend-selection.js
@@ -36,6 +36,39 @@ function extendSelectionWithinBlock(direction, granularity)
return positions;
}
+function extendSelectionWithinBlockWin(direction, granularity)
+{
+ if (granularity === "character")
+ return extendSelectionWithinBlock(direction, granularity);
+
+ var positions = [];
+
+ if (direction === "right") {
+ positions.push(getSerializedSelection());
+ getSelection().modify("extend", "right", granularity);
+
+ for (var index = 0; index < 3; ++index) {
+ positions.push(getSerializedSelection());
+ getSelection().modify("extend", "left", granularity);
+ }
+
+ positions.push(getSerializedSelection());
+ getSelection().modify("extend", "right", granularity);
+
+ positions.push(getSerializedSelection());
+ } else {
+ for (var index = 0; index < 2; ++index) {
+ positions.push(getSerializedSelection());
+ getSelection().modify("extend", "left", granularity);
+ }
+ for (var index = 0; index < 3; ++index) {
+ positions.push(getSerializedSelection());
+ getSelection().modify("extend", "right", granularity);
+ }
+ }
+ return positions;
+}
+
function extendSelectionToEnd(direction, granularity)
{
var positions = [];
@@ -108,7 +141,7 @@ function extendAndLogSelection(functionToExtendSelection, direction, granularity
function extendAndLogSelectionWithinBlock(direction, granularity, platform)
{
- return extendAndLogSelection({'mac': extendSelectionWithinBlock}[platform], direction, granularity);
+ return extendAndLogSelection({'mac': extendSelectionWithinBlock, 'win': extendSelectionWithinBlockWin}[platform], direction, granularity);
}
function extendAndLogSelectionToEnd(direction, granularity)

Powered by Google App Engine
This is Rietveld 408576698