// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // 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. import 'utils.dart'; String dart2jsHtml(String title, String scriptPath) { return """ Test $title

Running $title

"""; } /// Generates the HTML template file needed to load and run a dartdevc test in /// the browser. /// /// The [testName] is the short name of the test without any subdirectory path /// or extension, like "math_test". The [testJSDir] is the relative path to the /// build directory where the dartdevc-generated JS file is stored. String dartdevcHtml(String testName, String testJSDir, String buildDir) { var packagePaths = testPackages .map((package) => ' "$package": "/root_dart/$buildDir/gen/utils/' 'dartdevc/pkg/$package",') .join("\n"); return """ Test $testName

Running $testName

"""; }