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

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: merge changes 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
« no previous file with comments | « tests/utils/utils.status ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_test.dart
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
index 3198dd0cbb30cfa16b90bf0be41d753e9b7511ac..f563f9aa172248076688f7363cb3b56361cf397a 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,
String controllerScript,
String scriptType,
String sourceScript) =>
@@ -27,13 +27,29 @@ String GetHtmlContents(String title,
</html>
""";
-String WrapDartTestInLibrary(Path test) =>
+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>
+""";
+
+String wrapDartTestInLibrary(Path test) =>
"""
#library('libraryWrapper');
#source('$test');
""";
-String DartTestWrapper(Path dartHome, Path library) =>
+String dartTestWrapper(Path dartHome, Path library) =>
"""
#library('test');
« no previous file with comments | « tests/utils/utils.status ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698