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

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

Issue 9110031: Enable webdriver component in test.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 906731d5436dde8aa9c4e0f22395892ec9995e01..ebb17ec90fffc48cada2bea9d8edafafe805c35f 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -268,8 +268,9 @@ class StandardTestSuite implements TestSuite {
case 'dartium':
case 'chromium':
case 'frogium':
- enqueueBrowserTest(filename, testName, optionsFromFile,
- expectations, isNegative);
+ case 'webdriver':
+ enqueueBrowserTest(filename, testName, optionsFromFile,
+ expectations, isNegative);
break;
default:
// Only dartc supports fatal type errors. Enable fatal type
@@ -425,6 +426,7 @@ class StandardTestSuite implements TestSuite {
// TODO(whesse): Add --fatal-type-errors if needed.
break;
case 'frogium':
+ case 'webdriver':
compilerArgs.addAll(['--libdir=$dartDir/frog/lib',
'--compile-only',
'--out=$compiledDartWrapperFilename']);
@@ -440,20 +442,46 @@ class StandardTestSuite implements TestSuite {
Expect.fail('unimplemented component $component');
}
- var args = ['--no-timeout'];
- if (component == 'dartium') {
- var dartFlags = ['--enable_asserts', '--enable_type_checks'];
- dartFlags.addAll(vmOptions);
- args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
+ String executable = getFilename(dumpRenderTreeFilename);
+ List<String> args;
+ if (component == 'webdriver') {
+ executable = '$dartDir/tools/testing/run_selenium.py';
+ String browserFlag = 'chrome';
+ if (configuration['flag'] != null) {
+ for (var flag in configuration['flag'].split(',')) {
Bill Hesse 2012/01/06 13:39:09 Note: we could split configurations with commas in
Emily Fortuna 2012/01/08 18:47:06 You mean potentially list multiple browsers when c
+ switch (flag) {
+ case 'ff':
+ case 'firefox':
+ browserFlag = 'ff';
+ break;
+ case 'ie':
+ case 'explorer':
+ case 'internet-explorer':
+ browserFlag = 'ie';
+ break;
+ case 'safari':
+ browserFlag = 'safari';
+ break;
+ }
+ }
+ }
+ args = ['--out', htmlPath, '--browser', browserFlag];
+
+ } else {
Bill Hesse 2012/01/06 13:39:09 Move dumpRenderTree value for executable here?
+ args = ['--no-timeout'];
+ if (component == 'dartium') {
+ var dartFlags = ['--enable_asserts', '--enable_type_checks'];
+ dartFlags.addAll(vmOptions);
+ args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
+ }
+ args.add(htmlPath);
}
- args.add(htmlPath);
-
// Create BrowserTestCase and queue it.
var testCase = new BrowserTestCase(
testName,
compilerExecutable,
compilerArgs,
- getFilename(dumpRenderTreeFilename),
+ executable,
args,
configuration,
completeHandler,
@@ -503,6 +531,7 @@ class StandardTestSuite implements TestSuite {
return 'application/dart';
case 'chromium':
case 'frogium':
+ case 'webdriver':
return 'text/javascript';
default:
Expect.fail('Unimplemented component scriptType');
@@ -858,6 +887,7 @@ class TestUtils {
case 'dartc':
return 'compiler/bin/dartc$postfix';
case 'frogium':
+ case 'webdriver':
return 'frog/bin/frogsh$postfix';
default:
throw "Unknown compiler for: ${configuration['component']}";
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698