| 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 tests.html.mirrors_test; | 5 library tests.html.mirrors_test; |
| 6 | 6 |
| 7 @MirrorsUsed(targets: const [A, B]) |
| 7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 8 import 'dart:html'; | 9 import 'dart:html'; |
| 9 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 10 import 'package:unittest/html_config.dart'; | 11 import 'package:unittest/html_config.dart'; |
| 11 import '../utils.dart'; | 12 import '../utils.dart'; |
| 12 | 13 |
| 13 /// Regression test for a tricky mirrors+custom_elements issue: | 14 /// Regression test for a tricky mirrors+custom_elements issue: |
| 14 /// dart2js mirrors cache dispatch information on the Object's constructor. | 15 /// dart2js mirrors cache dispatch information on the Object's constructor. |
| 15 /// This was failing for custom elements on IE 10, because the constructor was | 16 /// This was failing for custom elements on IE 10, because the constructor was |
| 16 /// HTMLUnknownElement for all of them. So mirrors called the wrong method. | 17 /// HTMLUnknownElement for all of them. So mirrors called the wrong method. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 int _fooBar = 2; | 59 int _fooBar = 2; |
| 59 int _fooBarSet = 0; | 60 int _fooBarSet = 0; |
| 60 | 61 |
| 61 int get fooBar => _fooBar; | 62 int get fooBar => _fooBar; |
| 62 set fooBar(value) { | 63 set fooBar(value) { |
| 63 _fooBarSet++; | 64 _fooBarSet++; |
| 64 _fooBar = value; | 65 _fooBar = value; |
| 65 } | 66 } |
| 66 } | 67 } |
| OLD | NEW |