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

Unified Diff: tests/html/js_test.dart

Issue 138723006: Ensure that dart:js does not attempt to load cached proxies from prototypes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « sdk/lib/js/dart2js/js_dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/js_test.dart
diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
index 3d58e2df9fdeafe2ebe467788b42eca45ed4d9ac..39cff4c5cfc43d2315d7d8340be657f2f200bfa8 100644
--- a/tests/html/js_test.dart
+++ b/tests/html/js_test.dart
@@ -186,6 +186,10 @@ function identical(o1, o2) {
return o1 === o2;
}
+var someProto = { role: "proto" };
+var someObject = Object.create(someProto);
+someObject.role = "object";
+
""";
document.body.append(script);
}
@@ -286,6 +290,17 @@ main() {
context.deleteProperty('obj');
});
+ group('caching', () {
+ test('JS->Dart', () {
+ // Test that we are not pulling cached proxy from the prototype
+ // when asking for a proxy for the object.
+ final proto = context['someProto'];
+ expect(proto['role'], same('proto'));
+ final obj = context['someObject'];
+ expect(obj['role'], same('object'));
+ });
+ });
+
});
group('context', () {
@@ -995,4 +1010,5 @@ main() {
});
});
+
}
« no previous file with comments | « sdk/lib/js/dart2js/js_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698