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

Unified Diff: tests/html/json_helper.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/html/json_helper.dart
diff --git a/tests/compiler/dart2js_extra/22917_test.dart b/tests/html/json_helper.dart
similarity index 50%
copy from tests/compiler/dart2js_extra/22917_test.dart
copy to tests/html/json_helper.dart
index e4f46da549655e11e6dff57181ea9d018864a4d4..8207c643eebe8dcce3d8505cb6d73bef598cddd6 100644
--- a/tests/compiler/dart2js_extra/22917_test.dart
+++ b/tests/html/json_helper.dart
@@ -2,14 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Regression test for http://dartbug.com/22917
+@JsName("JSON")
+library json_helper;
-import 'package:expect/expect.dart';
-
-m(x) => print('x: $x');
-
-test() => Function.apply(m, []);
-
-main() {
- Expect.throws(test);
+// TODO(jacobr): depend on package:js instead of defining this annotation here.
sra1 2015/09/17 19:52:57 dart2js needs to find a known definition that is m
Siggi Cherem (dart-lang) 2015/09/18 20:34:10 how can package:js access this internal library? w
Jacob 2015/10/01 00:47:34 thanks for the link to what you did for lookup_map
Siggi Cherem (dart-lang) 2015/10/01 18:21:28 Makes sense you don't need to validate the version
Jacob 2015/10/02 20:08:15 got any pointers for how that should be done? Ther
+class JsName {
+ const JsName([this.name]);
+ final String name;
}
+
+external String stringify(object);

Powered by Google App Engine
This is Rietveld 408576698