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

Unified Diff: LayoutTests/dart/Multiscript.dart

Issue 974273003: Revert "Revert "Support multiple DOM isolates and tweak devtools frontend to better handle large #s… (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/dart/Multiscript.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/dart/Multiscript.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698