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

Side by Side Diff: tests/html/deferred_multi_app.dart

Issue 837903002: Fix deferred loading with multiple apps on same page. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing comments Created 5 years, 11 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 import "deferred_multi_app_lib.dart" deferred as lib;
6 import "dart:async";
7 import "dart:html";
8 import "package:expect/expect.dart";
9
10 main() {
11 Element state = querySelector("#state");
12 if (state.text == "1") {
13 lib.loadLibrary().then((_) {
14 var a = lib.one();
15 Expect.equals("one", a);
16 window.postMessage(a, '*');
17 });
18 state.text = "2";
19 } else {
20 new Timer(new Duration(milliseconds: 100), () {
21 lib.loadLibrary().then((_) {
22 var a = lib.two();
23 Expect.equals("two", a);
24 window.postMessage(a, '*');
25 });
26 });
27 }
28 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart ('k') | tests/html/deferred_multi_app_htmltest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698