Index: tools/testing/dart/browser_test.dart |
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart |
index f7dccc21a67413fcdbd9fab73b482d8108aec445..ce6e829d9ac99df1f25bcbb7a0c22058fea8f151 100644 |
--- a/tools/testing/dart/browser_test.dart |
+++ b/tools/testing/dart/browser_test.dart |
@@ -2,7 +2,7 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-String GetHtmlContents(String title, |
+String getHtmlContents(String title, |
Siggi Cherem (dart-lang)
2012/06/27 01:50:42
I noticed that these should start with lower-case
|
String controllerScript, |
String scriptType, |
String sourceScript) => |
@@ -27,6 +27,22 @@ String GetHtmlContents(String title, |
</html> |
"""; |
+String getHtmlLayoutContents(String scriptType, String sourceScript) => |
+""" |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
+</head> |
+<body> |
+ <script type="text/javascript"> |
+ if (navigator.webkitStartDart) navigator.webkitStartDart(); |
+ </script> |
+ <script type="$scriptType" src="$sourceScript"></script> |
+</body> |
+</html> |
+"""; |
+ |
/** |
* Returns the native [path] converted for use in a URI. |
*/ |
@@ -42,13 +58,13 @@ nativePathToUri(String path) { |
return path.replaceAll('\\', '/'); |
} |
-String WrapDartTestInLibrary(String test) => |
+String wrapDartTestInLibrary(String test) => |
""" |
#library('libraryWrapper'); |
#source('${nativePathToUri(test)}'); |
"""; |
-String DartTestWrapper(String dartHome, String library) { |
+String dartTestWrapper(String dartHome, String library) { |
dartHome = nativePathToUri(dartHome); |
library = nativePathToUri(library); |
return """ |