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

Unified Diff: tests/html/js_test.dart

Issue 1832713002: Optimize dartium dart:html bindings so real world application performance is acceptable. Improves d… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update cached patches Created 4 years, 9 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 | « tests/html/js_array_test.dart ('k') | tests/html/wrapping_collections_test.dart » ('j') | 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 a902d59f23985071252cbde4674c4f0393976cc3..ae9d9b3b9f1fd572254904ef702aebba7629cae0 100644
--- a/tests/html/js_test.dart
+++ b/tests/html/js_test.dart
@@ -240,34 +240,31 @@ main() {
expect(identical(c1, c2), isTrue);
});
- /*
- TODO(jacobr): enable this test when dartium supports maintaining proxy
- equality.
-
test('identical JS objects should have identical proxies', () {
var o1 = new JsObject(context['Foo'], [1]);
context['f1'] = o1;
var o2 = context['f1'];
- expect(equals(o1, o2), isTrue);
+ expect(identical(o1, o2), isTrue);
});
+/*
+ TODO(jacobr): enable this test when dartium supports maintaining proxy
+ equality.
test('identical Dart objects should have identical proxies', () {
var o1 = new TestDartObject();
expect(context.callMethod('identical', [o1, o1]), isTrue);
});
+ */
test('identical Dart functions should have identical proxies', () {
- var f1 = () => print("I'm a Function!");
+ var f1 = allowInterop(() => print("I'm a Function!"));
expect(context.callMethod('identical', [f1, f1]), isTrue);
});
- */
- // TODO(jacobr): switch from equals to indentical when dartium supports
- // maintaining proxy equality.
- test('identical JS functions should have equal proxies', () {
+ test('identical JS functions should have identical proxies', () {
var f1 = context['Object'];
var f2 = context['Object'];
- expect(f1, equals(f2));
+ expect(identical(f1, f2), isTrue);
});
// TODO(justinfagnani): old tests duplicate checks above, remove
@@ -454,7 +451,7 @@ main() {
expect(context['razzle'].apply([]), equals(42));
});
- test('JsFunction.apply on a function that uses "this"', () {
+ test('JsFunction.apply on a function that uses this', () {
var object = new Object();
expect(context['returnThis'].apply([], thisArg: object), same(object));
});
@@ -517,7 +514,7 @@ main() {
test('pass Array to JS', () {
context['a'] = [1, 2, 3];
expect(context.callMethod('isPropertyInstanceOf',
- ['a', context['Array']]), isFalse);
+ ['a', context['Array']]), isTrue);
var a = context['a'];
expect(a, new isInstanceOf<List>());
expect(a, isNot(new isInstanceOf<JsArray>()));
« no previous file with comments | « tests/html/js_array_test.dart ('k') | tests/html/wrapping_collections_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698