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

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

Issue 750653002: Checked mode fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41950. Created 6 years 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/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tools/bots/compiler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library trydart.incremental_compilation_update_test; 5 library trydart.incremental_compilation_update_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 8
9 import 'dart:async' show 9 import 'dart:async' show
10 Future; 10 Future;
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 ]; 999 ];
1000 1000
1001 void main() { 1001 void main() {
1002 listener.start(); 1002 listener.start();
1003 1003
1004 document.head.append(lineNumberStyle()); 1004 document.head.append(lineNumberStyle());
1005 1005
1006 return asyncTest(() => Future.forEach(tests, compileAndRun)); 1006 return asyncTest(() => Future.forEach(tests, compileAndRun));
1007 } 1007 }
1008 1008
1009 int testCount = 1;
1010
1009 Future compileAndRun(List<ProgramResult> programs) { 1011 Future compileAndRun(List<ProgramResult> programs) {
1010 var status = new DivElement(); 1012 var status = new DivElement();
1011 document.body.append(status); 1013 document.body.append(status);
1012 1014
1013 IFrameElement iframe = 1015 IFrameElement iframe =
1014 appendIFrame( 1016 appendIFrame(
1015 '/root_dart/tests/try/web/incremental_compilation_update.html', 1017 '/root_dart/tests/try/web/incremental_compilation_update.html',
1016 document.body) 1018 document.body)
1017 ..style.width = '100%' 1019 ..style.width = '100%'
1018 ..style.height = '600px'; 1020 ..style.height = '600px';
1019 1021
1020 return listener.expect('iframe-ready').then((_) { 1022 return listener.expect('iframe-ready').then((_) {
1021 ProgramResult program = programs.first; 1023 ProgramResult program = programs.first;
1022 1024
1023 1025
1024 status.append(new HeadingElement.h2()..appendText("Full program:")); 1026 status.append(
1027 new HeadingElement.h2()
1028 ..appendText("Full program #${testCount++}:"));
1025 status.append(numberedLines(program.code)); 1029 status.append(numberedLines(program.code));
1026 1030
1027 status.style.color = 'orange'; 1031 status.style.color = 'orange';
1028 WebCompilerTestCase test = new WebCompilerTestCase(program.code); 1032 WebCompilerTestCase test = new WebCompilerTestCase(program.code);
1029 return test.run().then((String jsCode) { 1033 return test.run().then((String jsCode) {
1030 status.style.color = 'red'; 1034 status.style.color = 'red';
1031 var objectUrl = 1035 var objectUrl =
1032 Url.createObjectUrl(new Blob([jsCode], 'application/javascript')); 1036 Url.createObjectUrl(new Blob([jsCode], 'application/javascript'));
1033 1037
1034 iframe.contentWindow.postMessage(['add-script', objectUrl], '*'); 1038 iframe.contentWindow.postMessage(['add-script', objectUrl], '*');
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 position: absolute; 1119 position: absolute;
1116 left: 0px; 1120 left: 0px;
1117 width: 3em; 1121 width: 3em;
1118 text-align: right; 1122 text-align: right;
1119 background-color: lightgoldenrodyellow; 1123 background-color: lightgoldenrodyellow;
1120 } 1124 }
1121 '''); 1125 ''');
1122 style.type = 'text/css'; 1126 style.type = 'text/css';
1123 return style; 1127 return style;
1124 } 1128 }
OLDNEW
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tools/bots/compiler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698