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

Side by Side Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 645513002: Scaffolding for testing incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix bad refactoring. Created 6 years, 2 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
« no previous file with comments | « dart/tests/try/web/incremental_compilation_update.html ('k') | dart/tests/try/web/print.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library trydart.incremental_compilation_update_test;
6
7 import 'dart:html';
8
9 import 'dart:async' show
10 Future;
11
12 import 'package:async_helper/async_helper.dart' show
13 asyncTest;
14
15 import 'sandbox.dart' show
16 appendIFrame,
17 listener;
18
19 import 'web_compiler_test_case.dart' show
20 WebCompilerTestCase;
21
22 void main() => asyncTest(() {
23 listener.start();
24
25 IFrameElement iframe =
26 appendIFrame(
27 '/root_dart/tests/try/web/incremental_compilation_update.html',
28 document.body)
29 ..style.width = '90vw'
30 ..style.height = '90vh';
31
32 return listener.expect('iframe-ready').then((_) {
33 Future<String> future =
34 new WebCompilerTestCase("main() { print('Hello, World!'); }").run();
35 return future.then((String jsCode) {
36 var objectUrl =
37 Url.createObjectUrl(new Blob([jsCode], 'application/javascript'));
38
39 iframe.contentWindow.postMessage(['add-script', objectUrl], '*');
40 return listener.expect(['Hello, World!', 'iframe-dart-main-done']).then(
41 (_) {
42 // TODO(ahe): Add incremental compilation here.
43 });
44 });
45 }).then((_) {
46 // Remove the iframe to work around a bug in test.dart.
47 iframe.remove();
48 });
49 });
OLDNEW
« no previous file with comments | « dart/tests/try/web/incremental_compilation_update.html ('k') | dart/tests/try/web/print.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698