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

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

Issue 705733003: Support dart and js scripts in HTML tests, on dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/scripts_test_js.js ('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/html_test.dart
diff --git a/tools/testing/dart/html_test.dart b/tools/testing/dart/html_test.dart
index ef2119a2d325d39c7cf56206d7a2a944bcf92887..a3a3506aebe84936a68c8bc1d95f57f0645836c9 100644
--- a/tools/testing/dart/html_test.dart
+++ b/tools/testing/dart/html_test.dart
@@ -44,4 +44,22 @@ HtmlTestInformation getInformation(String filename) {
String getContents(HtmlTestInformation info) {
String contents = new File(info.filePath.toNativePath()).readAsStringSync();
return contents.replaceFirst(htmlAnnotation, '');
-}
+}
+
+String makeFailingHtmlFile(String message) {
+ return '''
+<!DOCTYPE html>
+<html>
+<head>
+ <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
+ <title>Failing HTML test</title>
+</head><body>
+ <h1>Failing HTML test</h1>
+ $message
+ <script>
+ throw "HTML test failed: $message";
+ </script>
+</body>
+</html>
+''';
+}
« no previous file with comments | « tests/html/scripts_test_js.js ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698