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

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: moar 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 <html>
2 This test verifies that the height of an editable block remains the same after a dding block elements and removing them.
3 <div contenteditable="true" style="border: solid blue" id="test"></div>
4 <script>
5 window.addEventListener('load', function() {
6
7 var elem = document.getElementById("test");
8 var originalHeight = elem.offsetHeight;
9 var d = elem.appendChild(document.createElement('div'));
10 d.appendChild(document.createTextNode('aaa'));
11 d = elem.appendChild(document.createElement('div'));
12 d.appendChild(document.createTextNode('bbb'));
13 var newHeight = elem.offsetHeight;
14
15 while (elem.firstChild) {
16 elem.removeChild(elem.firstChild);
17 }
18
19 setTimeout(function() {
20 internals.notifyTestComplete(elem.offsetHeight == originalHeight ? 'PASS' : 'FAIL: expected=' + originalHeight + ', actual=' + elen.offsetHeight);
ojan 2014/11/21 22:55:10 This is fine. It'd be better if you used a mocha+c
21 });
22 });
23 </script>
24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698