| Index: third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html b/third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html
|
| index ddb01f5875067f16b7eacff8f4ecf8103b681c22..4b96aa720b47dbe3d86b6cb99110633b0b8eccd3 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html
|
| @@ -1,31 +1,81 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<body>
|
| -<p id="description">Tests bold/italic style toggling on a content that has text node without renderer (Ex: Tab/Space used for indentation)</p>
|
| -<div contenteditable id="root">
|
| -<div id="test">
|
| -<div>Some text</div>
|
| -<p>Some more text</p>
|
| -</div>
|
| -</div>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -test('mac');
|
| -test('win');
|
| -test('unix');
|
| -function test(platform) {
|
| - if (window.internals)
|
| - internals.settings.setEditingBehavior(platform);
|
| - startNewMarkupGroup('Test for '+platform);
|
| - runDumpAsTextEditingTest(true);
|
| -}
|
| -function editingTest() {
|
| - execSelectAllCommand();
|
| - execBoldCommand();
|
| - execItalicCommand();
|
| - execBoldCommand();
|
| - execItalicCommand();
|
| -}
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>^',
|
| + ' <div>abc def</div>',
|
| + ' <p>ghi jkl|</p>',
|
| + '</div>',
|
| + ].join('\n'),
|
| + 'bold',
|
| + [
|
| + '<div contenteditable>',
|
| + ' <div><b>^abc def</b></div>',
|
| + ' <p><b>ghi jkl|</b></p>',
|
| + '</div>',
|
| + ].join('\n')),
|
| + 'bold');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>^',
|
| + ' <div>abc def</div>',
|
| + ' <p>ghi jkl|</p>',
|
| + '</div>',
|
| + ].join('\n'),
|
| + selection => {
|
| + selection.document.execCommand('bold');
|
| + selection.document.execCommand('italic');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + ' <div><b><i>^abc def</i></b></div>',
|
| + ' <p><b><i>ghi jkl|</i></b></p>',
|
| + '</div>',
|
| + ].join('\n')),
|
| + 'bold+italic');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>^',
|
| + ' <div>abc def</div>',
|
| + ' <p>ghi jkl|</p>',
|
| + '</div>',
|
| + ].join('\n'),
|
| + selection => {
|
| + selection.document.execCommand('bold');
|
| + selection.document.execCommand('italic');
|
| + selection.document.execCommand('bold');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + ' <div><i>^abc def</i></div>',
|
| + ' <p><i>ghi jkl|</i></p>',
|
| + '</div>',
|
| + ].join('\n')),
|
| + 'bold+italic+bold');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>^',
|
| + ' <div>abc def</div>',
|
| + ' <p>ghi jkl|</p>',
|
| + '</div>',
|
| + ].join('\n'),
|
| + selection => {
|
| + selection.document.execCommand('bold');
|
| + selection.document.execCommand('italic');
|
| + selection.document.execCommand('bold');
|
| + selection.document.execCommand('italic');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + ' <div>^abc def</div>',
|
| + ' <p>ghi jkl|</p>',
|
| + '</div>',
|
| + ].join('\n')),
|
| + 'bold+italic+bold+italic');
|
| </script>
|
| -</body>
|
| -</html>
|
|
|