| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library jsTest; | 5 library jsTest; |
| 6 | 6 |
| 7 import 'dart:js'; | 7 import 'dart:js'; |
| 8 | 8 |
| 9 // TODO(jmesserly): get tests from package(s) instead. | 9 import 'package:dom/dom.dart'; |
| 10 import 'dom.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 11 import 'minitest.dart'; | |
| 12 | 11 |
| 13 class Foo { | 12 class Foo { |
| 14 final JsObject _proxy; | 13 final JsObject _proxy; |
| 15 | 14 |
| 16 Foo(num a) : this._proxy = new JsObject(context['Foo'], [a]); | 15 Foo(num a) : this._proxy = new JsObject(context['Foo'], [a]); |
| 17 | 16 |
| 18 JsObject toJs() => _proxy; | 17 JsObject toJs() => _proxy; |
| 19 | 18 |
| 20 num get a => _proxy['a']; | 19 num get a => _proxy['a']; |
| 21 num bar() => _proxy.callMethod('bar'); | 20 num bar() => _proxy.callMethod('bar'); |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 context['o'] = ctx.createImageData(1, 1); | 695 context['o'] = ctx.createImageData(1, 1); |
| 697 var imageDataType = context['ImageData']; | 696 var imageDataType = context['ImageData']; |
| 698 expect(context.callMethod('isPropertyInstanceOf', ['o', imageDataType]), | 697 expect(context.callMethod('isPropertyInstanceOf', ['o', imageDataType]), |
| 699 true); | 698 true); |
| 700 context.deleteProperty('o'); | 699 context.deleteProperty('o'); |
| 701 }); | 700 }); |
| 702 | 701 |
| 703 }); | 702 }); |
| 704 }); | 703 }); |
| 705 } | 704 } |
| OLD | NEW |