mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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
29 lines
761 B
Plaintext
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>
|