Index: LayoutTests/editing/execCommand/script-tests/toggle-link-win.js |
diff --git a/LayoutTests/editing/execCommand/script-tests/toggle-link-mac.js b/LayoutTests/editing/execCommand/script-tests/toggle-link-win.js |
similarity index 91% |
copy from LayoutTests/editing/execCommand/script-tests/toggle-link-mac.js |
copy to LayoutTests/editing/execCommand/script-tests/toggle-link-win.js |
index d6b6a83fcb79e8483046409a8b3ae5966c783800..cbe7c6c29a1930e1ce639f61173dc2a226217664 100644 |
--- a/LayoutTests/editing/execCommand/script-tests/toggle-link-mac.js |
+++ b/LayoutTests/editing/execCommand/script-tests/toggle-link-win.js |
@@ -4,7 +4,7 @@ var testContainer = document.createElement("div"); |
testContainer.contentEditable = true; |
document.body.appendChild(testContainer); |
if (window.internals) |
- internals.settings.setEditingBehavior('mac'); |
+ internals.settings.setEditingBehavior("win"); |
function testSingleToggle(toggleCommand, initialContents, selector, expectedContents) |
{ |
@@ -40,12 +40,13 @@ testSingleToggle("createLink", 'hello <b>world</b>', selectAll, '<a href="http:/ |
testSingleToggle("createLink", '<u>hello world</u>', selectAll, '<u><a href="http://webkit.org/">hello world</a></u>'); |
testSingleToggle("createLink", 'hello <a href="http://bugs.webkit.org/">world</a>', selectAll, '<a href="http://webkit.org/">hello world</a>'); |
testSingleToggle("createLink", 'hello <a href="http://bugs.webkit.org/" style="font-weight: bold">world</a>', selectAll, '<a href="http://webkit.org/">hello <b>world</b></a>'); |
-testSingleToggle("createLink", 'hello <b>world</b> WebKit', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b></a> WebKit'); |
-testSingleToggle("createLink", '<a href="http://trac.webkit.org/">hello <b>world</b></a> WebKit', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b></a> WebKit'); |
-testSingleToggle("createLink", '<a href="http://trac.webkit.org/" style="font-style: italic;">hello world</a> WebKit', selectFirstTwoWords, '<i><a href="http://webkit.org/">hello world</a></i> WebKit'); |
-testSingleToggle("createLink", 'hello <a href="http://trac.webkit.org/"><b>world</b> WebKit</a>', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b></a><a href="http://trac.webkit.org/"> WebKit</a>'); |
+testSingleToggle("createLink", 'hello <b>world</b> WebKit', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b> </a>WebKit'); |
+testSingleToggle("createLink", '<a href="http://trac.webkit.org/">hello <b>world</b></a> WebKit', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b> </a>WebKit'); |
+testSingleToggle("createLink", '<a href="http://trac.webkit.org/" style="font-style: italic;">hello world</a> WebKit', selectFirstTwoWords, '<a href="http://webkit.org/"><i>hello world</i> </a>WebKit'); |
+testSingleToggle("createLink", 'hello <a href="http://trac.webkit.org/"><b>world</b> WebKit</a>', selectFirstTwoWords, '<a href="http://webkit.org/">hello <b>world</b> </a><a href="http://trac.webkit.org/">WebKit</a>'); |
testSingleToggle("createLink", 'hello <a href="http://trac.webkit.org/" style="font-style: italic;"><b>world</b> WebKit</a>', selectFirstTwoWords, |
- '<a href="http://webkit.org/">hello <b style="font-style: italic;">world</b></a><a href="http://trac.webkit.org/"><i> WebKit</i></a>'); |
+ '<a href="http://webkit.org/">hello <b style="font-style: italic;">world</b> </a><a href="http://trac.webkit.org/" style="font-style: italic;">WebKit</a>'); |
+ |
testSingleToggle("createLink", 'hello <b>world</b> WebKit', selectLastWord, 'hello <b>world</b> <a href="http://webkit.org/">WebKit</a>'); |
testSingleToggle("createLink", '<u>hello <b>world</b> WebKit</u>', selectLastWord, '<u>hello <b>world</b> <a href="http://webkit.org/">WebKit</a></u>'); |
testSingleToggle("createLink", '<a href="http://trac.webkit.org/"><div>hello</div><div>world</div></a>', selectLastWord, |