mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix id/class collection from stylesheets
BUG=438036 R=esprehn@chromium.org Review URL: https://codereview.chromium.org/785313002
This commit is contained in:
parent
b33ce1e3a0
commit
08b367be54
@ -0,0 +1,6 @@
|
||||
Running 2 tests
|
||||
ok 1 Div width should grow width to 200px
|
||||
ok 2 Div width should grow height to 200px
|
||||
2 tests
|
||||
2 pass
|
||||
0 fail
|
||||
29
engine/src/flutter/tests/lowlevel/bug-438036.sky
Normal file
29
engine/src/flutter/tests/lowlevel/bug-438036.sky
Normal file
@ -0,0 +1,29 @@
|
||||
<sky>
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="../resources/chai.sky" />
|
||||
<style>
|
||||
div { width: 100px; height: 100px; background-color: red; }
|
||||
div.wide { width: 200px; }
|
||||
div#high { height: 200px; }
|
||||
</style>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<script>
|
||||
|
||||
describe("Div width", function() {
|
||||
it("should grow width to 200px", function() {
|
||||
var target = document.querySelector('div');
|
||||
|
||||
target.classList.add("wide");
|
||||
assert.equal(getComputedStyle(target).width, "200px");
|
||||
});
|
||||
|
||||
it("should grow height to 200px", function() {
|
||||
var target = document.querySelectorAll('div')[1];
|
||||
|
||||
target.id = 'high';
|
||||
assert.equal(getComputedStyle(target).height, "200px");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
Loading…
x
Reference in New Issue
Block a user