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

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

Issue 1409033005: Add @anonymous annotation and restrict object literal constructors to only anonymous classes. This … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 5 years, 1 month 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 | « pkg/js/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @JS()
6 library js_typed_interop_test; 6 library js_typed_interop_test;
7 7
8 import 'dart:html'; 8 import 'dart:html';
9 9
10 import 'package:js/js.dart'; 10 import 'package:js/js.dart';
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 external set x(int v); 107 external set x(int v);
108 external num multiplyByX(num y); 108 external num multiplyByX(num y);
109 external num multiplyBy2(num y); 109 external num multiplyBy2(num y);
110 external callClosureWithArgAndThis(Function closure, arg); 110 external callClosureWithArgAndThis(Function closure, arg);
111 external callClosureWithArg1(Function closure, arg1); 111 external callClosureWithArg1(Function closure, arg1);
112 external callClosureWithArg2(Function closure, arg1, arg2); 112 external callClosureWithArg2(Function closure, arg1, arg2);
113 external Bar getBar(); 113 external Bar getBar();
114 external static int multiplyDefault2(int a, [int b]); 114 external static int multiplyDefault2(int a, [int b]);
115 } 115 }
116 116
117 @anonymous
117 @JS() 118 @JS()
118 class ExampleLiteral { 119 class ExampleLiteral {
119 external factory ExampleLiteral({int x, String y, num z}); 120 external factory ExampleLiteral({int x, String y, num z});
120 121
121 external int get x; 122 external int get x;
122 external String get y; 123 external String get y;
123 external num get z; 124 external num get z;
124 } 125 }
125 126
126 @JS('Foob') 127 @JS('Foob')
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // We do know at runtime whether something is a JsArray or not. 333 // We do know at runtime whether something is a JsArray or not.
333 expect(foo is List, isFalse); 334 expect(foo is List, isFalse);
334 }); 335 });
335 336
336 test('dart interfaces', () { 337 test('dart interfaces', () {
337 expect(foo is Function, isFalse); 338 expect(foo is Function, isFalse);
338 expect(selection is List, isTrue); 339 expect(selection is List, isTrue);
339 }); 340 });
340 }); 341 });
341 } 342 }
OLDNEW
« no previous file with comments | « pkg/js/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698