| Index: third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js b/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
|
| index da45460b47be73b6d231b9ab41a60c94c2be794e..5d72409af40dea2be727634fee9d3614009492ba 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
|
| @@ -9,8 +9,9 @@ function testSingleToggle(toggleCommand, initialContents, expectedContents)
|
| testContainer.innerHTML = initialContents;
|
| window.getSelection().selectAllChildren(testContainer);
|
| document.execCommand(toggleCommand, false, null);
|
| - var action = 'one ' + toggleCommand + ' command converted "' + initialContents + '" to "' + expectedContents;
|
| - if (testContainer.innerHTML === expectedContents)
|
| + var actualContents = testContainer.innerHTML;
|
| + var action = 'one ' + toggleCommand + ' command converted "' + initialContents + '" to "' + actualContents;
|
| + if (actualContents === expectedContents)
|
| testPassed(action);
|
| else
|
| testFailed(action + '", expected "' + expectedContents + '"');
|
| @@ -35,10 +36,10 @@ for (var i = 0; i < platforms.length; i++) {
|
|
|
| // Following tests are cross-platform
|
| testSingleToggle("bold", "<u><span id='test'><b>hello</b></span><b>world</b></u>", '<u><span id="test">hello</span>world</u>');
|
| - testSingleToggle("bold", "<span id='test' style='font-weight:normal;'><b>hello</b></span>", '<span id="test">hello</span>');
|
| + testSingleToggle("bold", "<span id='test' style='font-weight:normal;'><b>hello</b></span>", '<span id="test" style="">hello</span>');
|
| testSingleToggle("bold", "<div><b>hello</b><br><br><b>world</b></div>", "<div>hello<br><br>world</div>");
|
| testSingleToggle("italic", "<i>hello </i><img>", "hello <img>");
|
| - testSingleToggle("italic", "<i><b>hello</b>world</i>", "<b>hello</b>world");
|
| + testSingleToggle("italic", "<i><b>hello</b>world</i>", "<b style=\"\">hello</b>world");
|
| testSingleToggle("italic", "<span style='font-style: normal;'> <i> hello </i> </span>", " hello ");
|
| testSingleToggle("italic", "<p><i>hello</i><span style='font-style:italic;'>world</span></p>", "<p>helloworld</p>");
|
| testSingleToggle("italic", "<s><b>hello<i> world</i></b></s>", "<s><b><i>hello world</i></b></s>");
|
|
|