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

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

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
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 dartJsScript,
8 String scriptType, 8 String scriptType,
9 String sourceScript) => 9 String sourceScript) =>
10 """ 10 """
(...skipping 29 matching lines...) Expand all
40 <script type="text/javascript"> 40 <script type="text/javascript">
41 if (navigator.webkitStartDart) navigator.webkitStartDart(); 41 if (navigator.webkitStartDart) navigator.webkitStartDart();
42 </script> 42 </script>
43 <script type="$scriptType" src="$sourceScript"></script> 43 <script type="$scriptType" src="$sourceScript"></script>
44 </body> 44 </body>
45 </html> 45 </html>
46 """; 46 """;
47 47
48 String wrapDartTestInLibrary(Path test) => 48 String wrapDartTestInLibrary(Path test) =>
49 """ 49 """
50 #library('libraryWrapper'); 50 library libraryWrapper;
51 #source('$test'); 51 part '$test';
52 """; 52 """;
53 53
54 String dartTestWrapper(Path dartHome, Path library) => 54 String dartTestWrapper(Path dartHome, Path library) =>
55 """ 55 """
56 #library('test'); 56 library test;
57 57
58 #import('${dartHome.append('pkg/unittest/unittest.dart')}', prefix: 'unittest'); 58 import '${dartHome.append('pkg/unittest/lib/unittest.dart')}' as unittest;
59 #import('${dartHome.append('pkg/unittest/html_config.dart')}', 59 import '${dartHome.append('pkg/unittest/lib/html_config.dart')}' as config;
60 prefix: 'config'); 60 import '${library}' as Test;
61
62 #import('${library}', prefix: "Test");
63 61
64 main() { 62 main() {
65 config.useHtmlConfiguration(); 63 config.useHtmlConfiguration();
66 unittest.group('', Test.main); 64 unittest.group('', Test.main);
67 } 65 }
68 """; 66 """;
69 67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698