mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
These still don't match the specs exactly, but they're much closer. R=ojan@chromium.org, eseidel@chromium.org Review URL: https://codereview.chromium.org/924203002
32 lines
934 B
Plaintext
32 lines
934 B
Plaintext
<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>
|
|
import "../resources/third_party/unittest/unittest.dart";
|
|
import "../resources/unit.dart";
|
|
|
|
import "dart:async";
|
|
import "dart:sky";
|
|
|
|
void main() {
|
|
initUnit();
|
|
|
|
test("remains the same after adding block elements and removing them", () {
|
|
var elem = document.getElementById("test");
|
|
var originalHeight = elem.offsetHeight;
|
|
var d = elem.appendChild(document.createElement('div'));
|
|
d.appendChild(new Text('aaa'));
|
|
d = elem.appendChild(document.createElement('div'));
|
|
d.appendChild(new Text('bbb'));
|
|
var newHeight = elem.offsetHeight;
|
|
|
|
elem.removeChildren();
|
|
|
|
new Timer(Duration.ZERO, expectAsync(() {
|
|
expect(elem.offsetHeight, equals(originalHeight));
|
|
}));
|
|
});
|
|
}
|
|
</script>
|
|
</sky>
|