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

Unified Diff: LayoutTests/fast/css/first-letter-range-insert.html

Issue 671963002: Add first-letter range layout test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/first-letter-range-insert.html
diff --git a/LayoutTests/fast/css/first-letter-range-insert.html b/LayoutTests/fast/css/first-letter-range-insert.html
new file mode 100644
index 0000000000000000000000000000000000000000..61c95d7b0c804b5db7e24fd7af3742c770815337
--- /dev/null
+++ b/LayoutTests/fast/css/first-letter-range-insert.html
@@ -0,0 +1,32 @@
+
+<style>
+div:first-child {
+ -webkit-column-count:65540;
+}
+div:first-letter {
+ color: green;
+}
+</style>
+<script>
+document.addEventListener("readystatechange", function() {
+ document.execCommand("SelectAll")
+ window.getSelection().deleteFromDocument();
+});
+
+document.addEventListener("DOMCharacterDataModified", modifiedListener);
+function modifiedListener(evt) {
+ document.removeEventListener("DOMCharacterDataModified", modifiedListener);
+ window.getSelection().getRangeAt(0).insertNode(document.getElementById('dfn'));
+}
+</script>
+<body>
+<!-- Passes if no CRASH in debug. -->
Xianzhu 2014/10/22 17:57:33 Nit: Please change the above comment into a displa
dsinclair 2014/10/22 20:04:31 I can't. The text in the document seems to affect
+
+<dfn id='dfn'></dfn>
+
+<span>
+<div id='node'>
+c B
+</div>
+</span>
+</body>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698