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

Unified Diff: sky/tests/editing/delete_block_contents.sky

Issue 748943002: remove childrenInline & setChildrenInline (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderParagraph.cpp ('k') | sky/tests/editing/delete_block_contents-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/editing/delete_block_contents.sky
diff --git a/sky/tests/editing/delete_block_contents.sky b/sky/tests/editing/delete_block_contents.sky
new file mode 100644
index 0000000000000000000000000000000000000000..833bcc0f878736bd835d5d97d780af69a634ce7e
--- /dev/null
+++ b/sky/tests/editing/delete_block_contents.sky
@@ -0,0 +1,28 @@
+<sky>
+<import src="../resources/chai.sky" />
+<import src="../resources/mocha.sky" />
+This test verifies that the height of an editable block remains the same after adding block elements and removing them.
+<div contenteditable="true" style="border: solid blue" id="test"></div>
+<script>
+describe("height of an editable block", function(done) {
+ it("remains the same after adding block elements and removing them", function() {
+ var elem = document.getElementById("test");
+ var originalHeight = elem.offsetHeight;
+ var d = elem.appendChild(document.createElement('div'));
+ d.appendChild(document.createTextNode('aaa'));
+ d = elem.appendChild(document.createElement('div'));
+ d.appendChild(document.createTextNode('bbb'));
+ var newHeight = elem.offsetHeight;
+
+ while (elem.firstChild) {
+ elem.removeChild(elem.firstChild);
+ }
+
+ setTimeout(function() {
+ assert.equal(elem.offsetHeight, originalHeight);
+ done();
+ });
+ });
+})
+</script>
+</sky>
« no previous file with comments | « sky/engine/core/rendering/RenderParagraph.cpp ('k') | sky/tests/editing/delete_block_contents-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698