| Index: LayoutTests/editing/execCommand/format-block-with-block.html
|
| diff --git a/LayoutTests/editing/execCommand/format-block-with-block.html b/LayoutTests/editing/execCommand/format-block-with-block.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c1713f8c141035796f06c00c7bfa1f4de4bcdb62
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/execCommand/format-block-with-block.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| +<script src="../../resources/dump-as-markup.js"></script>
|
| +<div id="testBlock" contenteditable>
|
| +<div style="color: green">hello</div>
|
| +</div>
|
| +<div id="testBlockWithBR" contenteditable>
|
| +<div style="color: green"><br></div>
|
| +</div>
|
| +<div id="testInline" contenteditable>
|
| +<span style="color: green">hello</span>
|
| +</div>
|
| +<script>
|
| +function verify(id)
|
| +{
|
| + var testElement = document.getElementById(id);
|
| + window.getSelection().selectAllChildren(testElement);
|
| +
|
| + Markup.dump(testElement, 'Before FormatBlock');
|
| + document.execCommand('FormatBlock', false, 'h1');
|
| + Markup.dump(testElement, 'After FormatBlock');
|
| +}
|
| +Markup.description("This test verifies that formatBlock adds the containing block element's inline style to the block-style element that replaces it.");
|
| +
|
| +verify("testBlock");
|
| +verify("testBlockWithBR");
|
| +verify("testInline");
|
| +
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|