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

Side by Side Diff: LayoutTests/dart/multiscript-js-interop.dart

Issue 1663753002: Apply all blink changes between @202695 and tip of trunk (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 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) 2015, 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 // Dart test for testing isolation across multiple script tags.
6 library multiscript_js_interop;
7 import 'package:js/js.dart';
8
9 typedef int GetValue();
10
11 @JS('window')
12 class State {
13 // Static stored in Dart so there is a unique value in each Dart DOM isolate.
14 static int sDart = 0;
15
16 @JS('sJs')
17 external static List<UpdateValue> get sJs;
18 @JS('sJs')
19 external static set sJs(List<UpdateValue> v);
20
21 static int getValue() { return sDart; }
22
23 static update() {
24 sDart++;
25 // We set this JS value from Dart to verify that JS Interop can pass Arrays
26 // between Dart and JS correctly.
27 if (sJs == null) {
28 sJs = <UpdateValue>[];
29 }
30 sJs.add(allowInterop(getValue));
31 }
32
33 @JS('registerCallback')
34 external static registerCallback(int index, Function callback);
35 }
OLDNEW
« no previous file with comments | « LayoutTests/dart/multi-wrapper-frame-test.html ('k') | LayoutTests/dart/multiscript-js-interop.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698