flutter_flutter/tests/styles/inline-style-crash.sky
Eric Seidel ab273a8433 Make splash animations abort on scroll.
I also fixed the transform hack in material-element to clean
up after itself.

I also discovered that our namedSetter implementation did not
handle null (it crashed) while doing this.  I fixed that
and tested my fix.

This runs great on a Nexus 5, but poorly on an Nexus 10.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/956753002
2015-02-24 17:20:18 -08:00

29 lines
761 B
Plaintext

<html>
<foo />
<script>
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";
import "dart:sky";
void main() {
initUnit();
test('should not crash when setting style to null', () {
var foo = document.querySelector('foo');
expect(foo.style['color'], isNull);
foo.style["color"] = null; // This used to crash.
expect(foo.style['color'], isNull);
foo.style["color"] = "blue";
expect(foo.style['color'], equals("rgb(0, 0, 255)"));
foo.style["color"] = null;
expect(foo.style['color'], isNull);
foo.style["color"] = "blue";
expect(foo.style['color'], equals("rgb(0, 0, 255)"));
foo.style.removeProperty("color");
expect(foo.style['color'], isNull);
});
}
</script>
</html>