Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: sky/tests/styles/inline_style_crash.dart

Issue 1212163009: Port remaining Sky tests to the new world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tests/styles/inline_style-expected.txt ('k') | sky/tests/styles/inline_style_crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « sky/tests/styles/inline_style-expected.txt ('k') | sky/tests/styles/inline_style_crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698