Title: [105445] trunk/Tools
- Revision
- 105445
- Author
- [email protected]
- Date
- 2012-01-19 14:04:55 -0800 (Thu, 19 Jan 2012)
Log Message
make-new-script-test should work with HTTP tests
https://bugs.webkit.org/show_bug.cgi?id=76603
Reviewed by Adam Roben.
* Scripts/make-new-script-test:
(makePathToSharedSources): Renamed from makeTestRelativePathToSharedSources(), since it
now also creates absolute paths for HTTP.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (105444 => 105445)
--- trunk/Tools/ChangeLog 2012-01-19 21:57:11 UTC (rev 105444)
+++ trunk/Tools/ChangeLog 2012-01-19 22:04:55 UTC (rev 105445)
@@ -1,3 +1,14 @@
+2012-01-19 Alexey Proskuryakov <[email protected]>
+
+ make-new-script-test should work with HTTP tests
+ https://bugs.webkit.org/show_bug.cgi?id=76603
+
+ Reviewed by Adam Roben.
+
+ * Scripts/make-new-script-test:
+ (makePathToSharedSources): Renamed from makeTestRelativePathToSharedSources(), since it
+ now also creates absolute paths for HTTP.
+
2012-01-19 Ryosuke Niwa <[email protected]>
Some perf tests time out when ran by run-perf-tests
Modified: trunk/Tools/Scripts/make-new-script-test (105444 => 105445)
--- trunk/Tools/Scripts/make-new-script-test 2012-01-19 21:57:11 UTC (rev 105444)
+++ trunk/Tools/Scripts/make-new-script-test 2012-01-19 22:04:55 UTC (rev 105445)
@@ -34,7 +34,7 @@
use Getopt::Long;
use webkitdirs;
-sub makeTestRelativePathToSharedSources;
+sub makePathToSharedSources;
sub openTestInEditor;
sub writeTestFile;
@@ -72,19 +72,23 @@
exit 0;
-sub makeTestRelativePathToSharedSources
+sub makePathToSharedSources
{
my $layoutTestsPath = getcwd();
$testAbsolutePath =~ m/^$layoutTestsPath/ or die "Path $testAbsolutePath is not in LayoutTests directory.\n";
- my $result = File::Spec->abs2rel("fast/js/resources/", dirname($testAbsolutePath));
- return $result;
+ my $isHTTPTest = $testAbsolutePath =~ m/^$layoutTestsPath\/http/;
+ if ($isHTTPTest) {
+ return "/js-test-resources";
+ } else {
+ return File::Spec->abs2rel("fast/js/resources/", dirname($testAbsolutePath));
+ }
}
sub writeTestFile
{
die "Test $testAbsolutePath already exists.\n" if (-e $testAbsolutePath);
- my $relativePathToSharedSources = makeTestRelativePathToSharedSources();
+ my $pathToSharedSources = makePathToSharedSources();
open TEST, ">", ${testAbsolutePath} or die "Cannot create test file at $testAbsolutePath.\n";
print TEST << "EOF";
@@ -92,7 +96,7 @@
<html>
<head>
<meta charset="utf-8">
-<script src=""
+<script src=""
</head>
<body>
<script>
@@ -102,7 +106,7 @@
// Your test script here. Feel free to modify surrounding HTML code if necessary.
</script>
-<script src=""
+<script src=""
</body>
</html>
EOF
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes