| Index: LayoutTests/dart/Multiscript.dart
|
| diff --git a/LayoutTests/dart/Multiscript.dart b/LayoutTests/dart/Multiscript.dart
|
| index 5d7237607e4a0f53e11890a0627cf6818364d80c..d00b40f99e209cdde4a966b1fb08e9c21b2bdd39 100644
|
| --- a/LayoutTests/dart/Multiscript.dart
|
| +++ b/LayoutTests/dart/Multiscript.dart
|
| @@ -4,19 +4,21 @@
|
|
|
| // Dart test for testing isolation across multiple script tags.
|
| library multiscript;
|
| -import 'dart:async';
|
| +import 'dart:js' as js;
|
|
|
| class State {
|
| - static int s = 0;
|
| - static _update() { s++; }
|
| - static int record(int value) {
|
| - _update();
|
| - _results.add(value);
|
| - if (_results.length == 4) {
|
| - _completer.complete(_results);
|
| - }
|
| + // Static stored in Dart so there is a unique value in each Dart DOM isolate.
|
| + static int sDart = 0;
|
| + static update() {
|
| + sDart++;
|
| + js.context['sJs']++;
|
| + }
|
| +
|
| + // Static stored on the JS side of the world so there is one value for it
|
| + // across all Dart DOM isolates.
|
| + static int get sJs => js.context['sJs'];
|
| +
|
| + static registerCallback(int index, Function callback) {
|
| + js.context.callMethod('registerCallback', [index, callback]);
|
| }
|
| - static final _completer = new Completer();
|
| - static final _results = new List();
|
| - static Future<List<int>> result = _completer.future;
|
| }
|
|
|