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

Unified Diff: LayoutTests/editing/execCommand/format-block-with-block.html

Issue 101933003: Preserving inline style of the replaced block element for FormatBlock('execCommand'). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselining Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/format-block-with-block-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/format-block-with-block-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698