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

Side by Side Diff: tests/html/js_typed_interop_anonymous_test.dart

Issue 1871573002: Breaking Change: Support @JS at library level (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to WebKit updated tests Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @JS()
5 library js_typed_interop_anonymous_test; 6 library js_typed_interop_anonymous_test;
6 7
7 import 'dart:html'; 8 import 'dart:html';
8 import 'dart:js' as js; 9 import 'dart:js' as js;
9 10
10 import 'package:js/js.dart'; 11 import 'package:js/js.dart';
11 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
12 import 'package:unittest/html_config.dart'; 13 import 'package:unittest/html_config.dart';
13 14
14 @JS() @anonymous 15 @JS() @anonymous
15 class Literal { 16 class Literal {
16 external factory Literal({int x, String y, num z}); 17 external factory Literal({int x, String y, num z});
17 18
18 external int get x; 19 external int get x;
19 external String get y; 20 external String get y;
20 external num get z; 21 external num get z;
21 } 22 }
22 23
23 main() { 24 main() {
24 useHtmlConfiguration(); 25 useHtmlConfiguration();
25 26
26 test('simple', () { 27 test('simple', () {
27 var l = new Literal(x: 3, y: "foo"); 28 var l = new Literal(x: 3, y: "foo");
28 expect(l.x, equals(3)); 29 expect(l.x, equals(3));
29 expect(l.y, equals("foo")); 30 expect(l.y, equals("foo"));
30 expect(l.z, isNull); 31 expect(l.z, isNull);
31 }); 32 });
32 } 33 }
OLDNEW
« no previous file with comments | « tests/html/js_typed_interop_anonymous_exp_test.dart ('k') | tests/html/js_typed_interop_anonymous_unreachable_exp_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698