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

Unified Diff: tools/testing/dart/browser_test.dart

Issue 10683009: Adds support for layout tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
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 """

Powered by Google App Engine
This is Rietveld 408576698