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

Unified Diff: LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-win.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/style/script-tests/make-text-writing-direction-inline-win.js
diff --git a/LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-mac.js b/LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-win.js
similarity index 78%
copy from LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-mac.js
copy to LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-win.js
index cc19c77a585c782174cee5c2fae8c469324a51f2..8d12e3916c4befec24b9dc0c36d063f927cd5442 100644
--- a/LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-mac.js
+++ b/LayoutTests/editing/style/script-tests/make-text-writing-direction-inline-win.js
@@ -1,9 +1,9 @@
description('Tests to ensure MakeTextWritingDirection* modifies the direction of text and embed texts properly.');
-if (window.internals)
- internals.settings.setEditingBehavior('mac');
if (!window.testRunner)
testFailed('This test requires testRunner');
+if (window.internals)
+ internals.settings.setEditingBehavior('win');
var testContainer = document.createElement("div");
testContainer.contentEditable = true;
@@ -68,40 +68,40 @@ function selectThirdWord(container) {
// left to right language
modifyWritingDirection('hello world', selectFirstWord, 'Natural', 'hello world');
-modifyWritingDirection('hello world', selectFirstWord, 'LeftToRight', '<span style="unicode-bidi: embed;">hello</span> world');
-modifyWritingDirection('hello world', selectFirstWord, 'RightToLeft', '<span style="unicode-bidi: embed; direction: rtl;">hello</span> world');
+modifyWritingDirection('hello world', selectFirstWord, 'LeftToRight', '<span style="unicode-bidi: embed;">hello </span>world');
+modifyWritingDirection('hello world', selectFirstWord, 'RightToLeft', '<span style="unicode-bidi: embed; direction: rtl;">hello </span>world');
modifyWritingDirection('<b>hello world</b> webkit', selectSecondAndThirdWords, 'Natural', '<b>hello world</b> webkit');
-modifyWritingDirection('<b>hello world</b> webkit', selectSecondAndThirdWords, 'LeftToRight', '<b>hello<span style="unicode-bidi: embed;"> world</span></b><span style="unicode-bidi: embed;"> webkit</span>');
-modifyWritingDirection('<b>hello world</b> webkit', selectSecondAndThirdWords, 'RightToLeft', '<b>hello<span style="unicode-bidi: embed; direction: rtl;"> world</span></b><span style="unicode-bidi: embed; direction: rtl;"> webkit</span>');
+modifyWritingDirection('<b>hello world</b> webkit', selectSecondAndThirdWords, 'LeftToRight', '<b>hello <span style="unicode-bidi: embed;">world</span></b><span style="unicode-bidi: embed;"> webkit</span>');
+modifyWritingDirection('<b>hello world</b> webkit', selectSecondAndThirdWords, 'RightToLeft', '<b>hello <span style="unicode-bidi: embed; direction: rtl;">world</span></b><span style="unicode-bidi: embed; direction: rtl;"> webkit</span>');
modifyWritingDirection('<span dir="rtl">hello <span dir="ltr">world webkit rocks</span></span>', selectThirdWord, 'Natural',
- '<span dir="rtl">hello <span dir="ltr">world</span></span> webkit<span dir="rtl"><span dir="ltr"> rocks</span></span>');
+ '<span dir="rtl">hello <span dir="ltr">world </span></span>webkit <span dir="rtl"><span dir="ltr">rocks</span></span>');
modifyWritingDirection('<span dir="rtl">hello <span dir="ltr">world webkit rocks</span></span>', selectThirdWord, 'LeftToRight',
- '<span dir="rtl">hello <span dir="ltr">world</span></span><span style="unicode-bidi: embed;"> webkit</span><span dir="rtl"><span dir="ltr"> rocks</span></span>');
+ '<span dir="rtl">hello <span dir="ltr">world </span></span><span style="unicode-bidi: embed;">webkit </span><span dir="rtl"><span dir="ltr">rocks</span></span>');
modifyWritingDirection('<span dir="rtl">hello <span dir="ltr">world webkit rocks</span></span>', selectThirdWord, 'RightToLeft',
- '<span dir="rtl">hello <span dir="ltr">world</span> webkit<span dir="ltr"> rocks</span></span>');
+ '<span dir="rtl">hello <span dir="ltr">world </span>webkit <span dir="ltr">rocks</span></span>');
// right to left language
modifyWritingDirection('هنا يكتب النص العربي', selectFirstWord, 'Natural', 'هنا يكتب النص العربي');
-modifyWritingDirection('هنا يكتب النص العربي', selectFirstWord, 'LeftToRight', '<span style="unicode-bidi: embed;">هنا</span> يكتب النص العربي');
-modifyWritingDirection('هنا يكتب النص العربي', selectFirstWord, 'RightToLeft', '<span style="unicode-bidi: embed; direction: rtl;">هنا</span> يكتب النص العربي');
+modifyWritingDirection('هنا يكتب النص العربي', selectFirstWord, 'LeftToRight', '<span style="unicode-bidi: embed;">هنا </span>يكتب النص العربي');
+modifyWritingDirection('هنا يكتب النص العربي', selectFirstWord, 'RightToLeft', '<span style="unicode-bidi: embed; direction: rtl;">هنا </span>يكتب النص العربي');
modifyWritingDirection('<b>هنا يكتب</b> النص العربي', selectSecondAndThirdWords, 'Natural', '<b>هنا يكتب</b> النص العربي');
-modifyWritingDirection('<b>هنا يكتب</b> النص العربي', selectSecondAndThirdWords, 'LeftToRight', '<b>هنا<span style="unicode-bidi: embed;"> يكتب</span></b><span style="unicode-bidi: embed;"> النص</span> العربي');
-modifyWritingDirection('<b>هنا يكتب</b> النص العربي', selectSecondAndThirdWords, 'RightToLeft', '<b>هنا<span style="unicode-bidi: embed; direction: rtl;"> يكتب</span></b><span style="unicode-bidi: embed; direction: rtl;"> النص</span> العربي');
+modifyWritingDirection('<b>هنا يكتب</b> النص العربي', selectSecondAndThirdWords, 'LeftToRight', '<b>هنا <span style="unicode-bidi: embed;">يكتب</span></b><span style="unicode-bidi: embed;"> النص </span>العربي');
+modifyWritingDirection('<b>هنا يكتب</b> النص العربي', selectSecondAndThirdWords, 'RightToLeft', '<b>هنا <span style="unicode-bidi: embed; direction: rtl;">يكتب</span></b><span style="unicode-bidi: embed; direction: rtl;"> النص </span>العربي');
modifyWritingDirection('<div dir="rtl">هنا يكتب النص العربي</div>', selectFirstWord, 'Natural', '<div dir="rtl">هنا يكتب النص العربي</div>');
-modifyWritingDirection('<div dir="rtl">هنا يكتب النص العربي</div>', selectFirstWord, 'LeftToRight', '<div dir="rtl"><span style="unicode-bidi: embed; direction: ltr;">هنا</span> يكتب النص العربي</div>');
-modifyWritingDirection('<div dir="rtl">هنا يكتب النص العربي</div>', selectFirstWord, 'RightToLeft', '<div dir="rtl"><span style="unicode-bidi: embed;">هنا</span> يكتب النص العربي</div>');
+modifyWritingDirection('<div dir="rtl">هنا يكتب النص العربي</div>', selectFirstWord, 'LeftToRight', '<div dir="rtl"><span style="unicode-bidi: embed; direction: ltr;">هنا </span>يكتب النص العربي</div>');
+modifyWritingDirection('<div dir="rtl">هنا يكتب النص العربي</div>', selectFirstWord, 'RightToLeft', '<div dir="rtl"><span style="unicode-bidi: embed;">هنا </span>يكتب النص العربي</div>');
modifyWritingDirection('<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>', selectSecondAndThirdWords, 'Natural', '<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>');
-modifyWritingDirection('<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>', selectSecondAndThirdWords, 'LeftToRight', '<div dir="rtl"><b>هنا<span style="unicode-bidi: embed; direction: ltr;"> يكتب</span></b><span style="unicode-bidi: embed; direction: ltr;"> النص</span> العربي</div>');
-modifyWritingDirection('<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>', selectSecondAndThirdWords, 'RightToLeft', '<div dir="rtl"><b>هنا<span style="unicode-bidi: embed;"> يكتب</span></b><span style="unicode-bidi: embed;"> النص</span> العربي</div>');
+modifyWritingDirection('<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>', selectSecondAndThirdWords, 'LeftToRight', '<div dir="rtl"><b>هنا <span style="unicode-bidi: embed; direction: ltr;">يكتب</span></b><span style="unicode-bidi: embed; direction: ltr;"> النص </span>العربي</div>');
+modifyWritingDirection('<div dir="rtl"><b>هنا يكتب</b> النص العربي</div>', selectSecondAndThirdWords, 'RightToLeft', '<div dir="rtl"><b>هنا <span style="unicode-bidi: embed;">يكتب</span></b><span style="unicode-bidi: embed;"> النص </span>العربي</div>');
modifyWritingDirection('<div dir="rtl">هنا <span dir="ltr">يكتب النص العربي</span></div>', selectThirdWord, 'Natural',
- '<div dir="rtl">هنا <span dir="ltr">يكتب</span> النص<span dir="ltr"> العربي</span></div>');
+ '<div dir="rtl">هنا <span dir="ltr">يكتب </span>النص <span dir="ltr">العربي</span></div>');
modifyWritingDirection('<div dir="rtl">هنا <span dir="ltr">يكتب النص العربي</span></div>', selectThirdWord, 'LeftToRight',
'<div dir="rtl"><span style="unicode-bidi: embed; direction: ltr;">هنا يكتب النص العربي</span></div>');
modifyWritingDirection('<div dir="rtl">هنا <span dir="ltr">يكتب النص العربي</span></div>', selectThirdWord, 'RightToLeft',
- '<div dir="rtl">هنا <span dir="ltr">يكتب</span><span style="unicode-bidi: embed;"> النص</span><span dir="ltr"> العربي</span></div>');
+ '<div dir="rtl">هنا <span dir="ltr">يكتب </span><span style="unicode-bidi: embed;">النص </span><span dir="ltr">العربي</span></div>');
// bidirectional langauge
modifyWritingDirection('写中文', selectFirstWord, 'Natural', '写中文');

Powered by Google App Engine
This is Rietveld 408576698