| OLD | NEW |
| 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 } |
| OLD | NEW |