| Index: sky/tests/styles/inline_style_crash.dart
|
| diff --git a/sky/tests/styles/inline-style-crash.sky b/sky/tests/styles/inline_style_crash.dart
|
| similarity index 78%
|
| rename from sky/tests/styles/inline-style-crash.sky
|
| rename to sky/tests/styles/inline_style_crash.dart
|
| index 9a017c79b95286bedfa2845dc7beb851e72fe8a6..9583f020422cb5fa197e533e4e9bb6712c20e7d2 100644
|
| --- a/sky/tests/styles/inline-style-crash.sky
|
| +++ b/sky/tests/styles/inline_style_crash.dart
|
| @@ -1,6 +1,3 @@
|
| -<html>
|
| -<foo />
|
| -<script>
|
| import "../resources/third_party/unittest/unittest.dart";
|
| import "../resources/unit.dart";
|
|
|
| @@ -10,7 +7,11 @@ void main() {
|
| initUnit();
|
|
|
| test('should not crash when setting style to null', () {
|
| - var foo = document.querySelector('foo');
|
| + LayoutRoot layoutRoot = new LayoutRoot();
|
| + var document = new Document();
|
| + var foo = document.createElement('foo');
|
| + layoutRoot.rootElement = foo;
|
| +
|
| expect(foo.style['color'], isNull);
|
| foo.style["color"] = null; // This used to crash.
|
| expect(foo.style['color'], isNull);
|
| @@ -22,7 +23,7 @@ void main() {
|
| expect(foo.style['color'], equals("rgb(0, 0, 255)"));
|
| foo.style.removeProperty("color");
|
| expect(foo.style['color'], isNull);
|
| +
|
| + layoutRoot.layout();
|
| });
|
| }
|
| -</script>
|
| -</html>
|
|
|