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

Unified Diff: pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart

Issue 2394103002: Fix for the missing new keyword on an external factory call and updated expected test failures/e… (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart
diff --git a/pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart b/pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart
index 431d533037e10d83a3493fd049c0da557b007927..f0b993867712f004cf898de2c7ca4b2622c147d5 100644
--- a/pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart
+++ b/pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_test.dart
@@ -71,7 +71,7 @@ _injectJs() {
getA: function() { return this.a;}
};
- var selection = ["a", "b", "c", foo, bar];
+ var selection = ["a", "b", "c", foo, bar];
function returnNumArgs() { return arguments.length; };
function returnLastArg() { return arguments[arguments.length-1]; };
@@ -110,6 +110,14 @@ class ClassWithConstructor {
external get b;
}
+@JS('ClassWithConstructor')
+class ClassWithFactory {
+ external factory ClassWithFactory(aParam, bParam);
+ external getA();
+ external get a;
+ external get b;
+}
+
typedef num MultiplyWithDefault(num a, [num b]);
@JS()
@@ -223,6 +231,13 @@ main() {
expect(o.b, equals("bar"));
expect(o.getA(), equals("foo"));
});
+
+ test('external factory', () {
+ var o = new ClassWithFactory("foo", "bar");
+ expect(o.a, equals("foo"));
+ expect(o.b, equals("bar"));
+ expect(o.getA(), equals("foo"));
+ });
});
group('property', () {
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698