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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <sky>
2 <import src="../resources/chai.sky" />
3 <import src="../resources/mocha.sky" />
4 This test verifies that the height of an editable block remains the same after a dding block elements and removing them.
5 <div contenteditable="true" style="border: solid blue" id="test"></div>
6 <script>
7 describe("height of an editable block", function(done) {
8 it("remains the same after adding block elements and removing them", function( ) {
9 var elem = document.getElementById("test");
10 var originalHeight = elem.offsetHeight;
11 var d = elem.appendChild(document.createElement('div'));
12 d.appendChild(document.createTextNode('aaa'));
13 d = elem.appendChild(document.createElement('div'));
14 d.appendChild(document.createTextNode('bbb'));
15 var newHeight = elem.offsetHeight;
16
17 while (elem.firstChild) {
18 elem.removeChild(elem.firstChild);
19 }
20
21 setTimeout(function() {
22 assert.equal(elem.offsetHeight, originalHeight);
23 done();
24 });
25 });
26 })
27 </script>
28 </sky>
OLDNEW
« 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