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

Unified Diff: tests/compiler/dart2js_native/foreign_test.dart

Issue 12049067: Restrict some JS names that we might use in our JS blocks. It doesn't break for now because our JS … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/compiler/dart2js_native/foreign_test.dart
===================================================================
--- tests/compiler/dart2js_native/foreign_test.dart (revision 17705)
+++ tests/compiler/dart2js_native/foreign_test.dart (working copy)
@@ -30,4 +30,10 @@
Expect.equals(998, foreign2());
Expect.equals('1234567891011',
foreign11('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'));
+ // Ensure there will be isNaN and NaN variable names.
+ var isNaN = called ? 42 : 44;
+ var NaN = called ? 52 : 54;
+ Expect.isFalse(JS('bool', 'isNaN(#)', isNaN));
+ Expect.isFalse(JS('bool', 'isNaN(#)', NaN));
+ Expect.isTrue(JS('bool', 'isNaN(#)', double.NAN));
}

Powered by Google App Engine
This is Rietveld 408576698