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

Side by Side Diff: tests/compiler/dart2js_native/multiscript_part2_test.dart

Issue 155983004: Fix DOM Isolate affinity for interceptors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 // Methods on (shared) native classes should have DOM isolate affinity.
8 // Test that part1 and part2 can be loaded into the same JavaScript context
9 // without conflicts.
10
11 class A native "AA" {
12 // [foo] is the same in both isolates but optimized differently.
13 foo(x) => x is String;
14
15 // [bar] has different definitions in the two isolates.
16 bar(x) => 'two:$x';
17 }
18
19 makeA() native;
20
21 void setup() native """
22 // Use existing definition if present to force sharing.
23 if (typeof AA == "undefined") {
24 AA = function AA() {};
25 }
26 makeA = function(){return new AA;};
27 """;
28
29 main() {
30 setup();
31
32 Expect.equals(false, makeA().foo(123));
33 Expect.equals('two:hi', makeA().bar('hi'));
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698