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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky'; 5 import 'dart:sky' as sky;
6
6 import '../resources/third_party/unittest/unittest.dart'; 7 import '../resources/third_party/unittest/unittest.dart';
7 import '../resources/unit.dart'; 8 import '../resources/unit.dart';
8 9
9 void main() { 10 void main() {
10 initUnit(); 11 initUnit();
11 12
12 test("color accessors should work", () { 13 test("createText(null) shouldn't crash", () {
13 Color foo = new Color(0x12345678); 14 var doc = new sky.Document();
14 expect(foo.alpha, equals(0x12)); 15 doc.createText(null);
15 expect(foo.red, equals(0x34));
16 expect(foo.green, equals(0x56));
17 expect(foo.blue, equals(0x78));
18 }); 16 });
19 } 17 }
OLDNEW
« 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