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

Side by Side Diff: tools/testing/dart/browser_test.dart

Issue 10696092: Initial tests for JS interop (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 8 years, 5 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 | « tests/html/js_interop_2_test.dart ('k') | tools/testing/dart/test_suite.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 String getHtmlContents(String title, 5 String getHtmlContents(String title,
6 String controllerScript, 6 String controllerScript,
7 String dartJsScript,
7 String scriptType, 8 String scriptType,
8 String sourceScript) => 9 String sourceScript) =>
9 """ 10 """
10 <!DOCTYPE html> 11 <!DOCTYPE html>
11 <html> 12 <html>
12 <head> 13 <head>
13 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 14 <meta http-equiv="X-UA-Compatible" content="IE=edge">
14 <title> Test $title </title> 15 <title> Test $title </title>
15 <style> 16 <style>
16 .unittest-table { font-family:monospace; border:1px; } 17 .unittest-table { font-family:monospace; border:1px; }
17 .unittest-pass { background: #6b3;} 18 .unittest-pass { background: #6b3;}
18 .unittest-fail { background: #d55;} 19 .unittest-fail { background: #d55;}
19 .unittest-error { background: #a11;} 20 .unittest-error { background: #a11;}
20 </style> 21 </style>
21 </head> 22 </head>
22 <body> 23 <body>
23 <h1> Running $title </h1> 24 <h1> Running $title </h1>
24 <script type="text/javascript" src="$controllerScript"></script> 25 <script type="text/javascript" src="$controllerScript"></script>
25 <script type="$scriptType" src="$sourceScript"></script> 26 <script type="$scriptType" src="$sourceScript"></script>
27 <script type="text/javascript" src="$dartJsScript"></script>
26 </body> 28 </body>
27 </html> 29 </html>
28 """; 30 """;
29 31
30 String getHtmlLayoutContents(String scriptType, String sourceScript) => 32 String getHtmlLayoutContents(String scriptType, String sourceScript) =>
31 """ 33 """
32 <!DOCTYPE html> 34 <!DOCTYPE html>
33 <html> 35 <html>
34 <head> 36 <head>
35 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 37 <meta http-equiv="X-UA-Compatible" content="IE=edge">
(...skipping 28 matching lines...) Expand all
64 try { 66 try {
65 unittest.ensureInitialized(); 67 unittest.ensureInitialized();
66 Test.main(); 68 Test.main();
67 } catch(var e, var trace) { 69 } catch(var e, var trace) {
68 unittest.reportTestError( 70 unittest.reportTestError(
69 e.toString(), trace == null ? '' : trace.toString()); 71 e.toString(), trace == null ? '' : trace.toString());
70 } 72 }
71 } 73 }
72 """; 74 """;
73 75
OLDNEW
« no previous file with comments | « tests/html/js_interop_2_test.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698