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

Unified Diff: sky/tests/raw/null_text_crash.dart

Issue 1196463002: Don't crash if you call document.createText(null) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/engine/core/dom/Document.idl ('k') | sky/tests/raw/null_text_crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/raw/null_text_crash.dart
diff --git a/sky/tests/framework/color_accessors.dart b/sky/tests/raw/null_text_crash.dart
similarity index 54%
copy from sky/tests/framework/color_accessors.dart
copy to sky/tests/raw/null_text_crash.dart
index 93b03c670c0314c04c22c3e1a7b740c923cc803c..441646ab2a8ec4df5ab1a1428dbae563bbae0771 100644
--- a/sky/tests/framework/color_accessors.dart
+++ b/sky/tests/raw/null_text_crash.dart
@@ -2,18 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:sky';
+import 'dart:sky' as sky;
+
import '../resources/third_party/unittest/unittest.dart';
import '../resources/unit.dart';
void main() {
initUnit();
- test("color accessors should work", () {
- Color foo = new Color(0x12345678);
- expect(foo.alpha, equals(0x12));
- expect(foo.red, equals(0x34));
- expect(foo.green, equals(0x56));
- expect(foo.blue, equals(0x78));
+ test("createText(null) shouldn't crash", () {
+ var doc = new sky.Document();
+ doc.createText(null);
});
}
« no previous file with comments | « sky/engine/core/dom/Document.idl ('k') | sky/tests/raw/null_text_crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698