[webkit-changes] cvs commit: WebKitTools/Scripts run-webkit-tests
Eric
eseidel at opensource.apple.com
Thu Dec 29 23:04:11 PST 2005
eseidel 05/12/29 23:04:10
Modified: . ChangeLog
DumpRenderTree DumpRenderTree.m
Scripts run-webkit-tests
Log:
Bug #: none
Submitted by: eseidel
Reviewed by: mjs
Move WebView width/height logic into DumpRenderTree to support
running the W3C SVG 1.1 tests along side other tests. The W3C
SVG 1.1 tests require a 480x360 view.
* DumpRenderTree/DumpRenderTree.m:
(main): don't accept width/height
(dump): override width/height for SVG/W3C
* Scripts/run-webkit-tests: don't pass width/height
Revision Changes Path
1.136 +13 -0 WebKitTools/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKitTools/ChangeLog,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- ChangeLog 30 Dec 2005 06:43:08 -0000 1.135
+++ ChangeLog 30 Dec 2005 07:04:10 -0000 1.136
@@ -1,5 +1,18 @@
2005-12-30 Eric Seidel <eseidel at apple.com>
+ Reviewed by mjs.
+
+ Move WebView width/height logic into DumpRenderTree to support
+ running the W3C SVG 1.1 tests along side other tests. The W3C
+ SVG 1.1 tests require a 480x360 view.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): don't accept width/height
+ (dump): override width/height for SVG/W3C
+ * Scripts/run-webkit-tests: don't pass width/height
+
+2005-12-30 Eric Seidel <eseidel at apple.com>
+
No review, only removing dead code.
* DumpKCanvasTree/DumpKCanvasTree.m: Removed.
1.23 +8 -21 WebKitTools/DumpRenderTree/DumpRenderTree.m
Index: DumpRenderTree.m
===================================================================
RCS file: /cvs/root/WebKitTools/DumpRenderTree/DumpRenderTree.m,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- DumpRenderTree.m 30 Dec 2005 06:38:53 -0000 1.22
+++ DumpRenderTree.m 30 Dec 2005 07:04:10 -0000 1.23
@@ -134,13 +134,8 @@
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
class_poseAs(objc_getClass("DumpRenderTreePasteboard"), objc_getClass("NSPasteboard"));
-
- int width = 800;
- int height = 600;
struct option options[] = {
- {"width", required_argument, NULL, 'w'},
- {"height", required_argument, NULL, 'h'},
{"pixel-tests", no_argument, &dumpPixels, YES},
{"tree", no_argument, &dumpTree, YES},
{"notree", no_argument, &dumpTree, NO},
@@ -173,20 +168,6 @@
int option;
while ((option = getopt_long(argc, (char * const *)argv, "", options, NULL)) != -1)
switch (option) {
- case 'w':
- width = strtol(optarg, NULL, 0);
- if (width <= 0) {
- fprintf(stderr, "%s: invalid width\n", argv[0]);
- exit(1);
- }
- break;
- case 'h':
- height = strtol(optarg, NULL, 0);
- if (height <= 0) {
- fprintf(stderr, "%s: invalid height\n", argv[0]);
- exit(1);
- }
- break;
case '?': // unknown or ambiguous option
case ':': // missing argument
exit(1);
@@ -203,7 +184,7 @@
localPasteboard = [NSPasteboard pasteboardWithUniqueName];
- WebView *webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 0, width, height)];
+ WebView *webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)];
WaitUntilDoneDelegate *delegate = [[WaitUntilDoneDelegate alloc] init];
EditingDelegate *editingDelegate = [[EditingDelegate alloc] init];
[webView setFrameLoadDelegate:delegate];
@@ -264,8 +245,14 @@
DOMElement *documentElement = [[frame DOMDocument] documentElement];
if ([documentElement isKindOfClass:[DOMHTMLElement class]])
result = [[(DOMHTMLElement *)documentElement innerText] stringByAppendingString:@"\n"];
- } else
+ } else {
+ bool isSVGW3CTest = ([currentTest rangeOfString:@"svg/W3C-SVG-1.1"].length);
+ if (isSVGW3CTest)
+ [[frame webView] setFrameSize:NSMakeSize(480, 360)];
+ else
+ [[frame webView] setFrameSize:NSMakeSize(800, 600)];
result = [frame renderTreeAsExternalRepresentation];
+ }
if (!result)
printf("ERROR: nil result from %s", dumpAsText ? "[documentElement innerText]" : "[frame renderTreeAsExternalRepresentation]");
1.41 +2 -9 WebKitTools/Scripts/run-webkit-tests
Index: run-webkit-tests
===================================================================
RCS file: /cvs/root/WebKitTools/Scripts/run-webkit-tests,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- run-webkit-tests 19 Dec 2005 21:03:53 -0000 1.40
+++ run-webkit-tests 30 Dec 2005 07:04:10 -0000 1.41
@@ -61,8 +61,6 @@
my $pixelTests = '';
my $checkLeaks = '';
my $guardMalloc = '';
-my $maxWidth = '';
-my $maxHeight = '';
my $verbose = 0;
my $quiet = '';
my $singly = 0;
@@ -72,8 +70,6 @@
'pixel-tests|p' => \$pixelTests,
'leaks|l' => \$checkLeaks,
'guard-malloc|g' => \$guardMalloc,
- 'max-width|w=s' => \$maxWidth,
- 'max-height|h=s' => \$maxHeight,
'verbose|v' => \$verbose,
'quiet|q' => \$quiet,
'singly|1' => \$singly,
@@ -84,9 +80,6 @@
exit $result if $result;
if ($testSVGs) {
$pixelTests = 1; # Pixel tests are always on for SVG.
- # Temporary Hack: to pass w3c SVG layout tests which assume a smaller window size.
- $maxWidth = 480 if (!$maxWidth);
- $maxHeight = 360 if (!$maxHeight);
}
my $tool = "$productDir/$dumpToolName";
@@ -113,6 +106,8 @@
my $extensionPart = "-name '*.html' -or -name '*.xml' -or -name '*.xhtml'";
if ($testSVGs) {
$extensionPart = "-name '*.svg' -or -name '*.xml'";
+} elsif ($haveSVGSupport) {
+ $extensionPart .= " -or -name '*.svg'";
} else {
$prunePart .= " -or \\( -name svg \\! -prune \\)";
}
@@ -153,8 +148,6 @@
if ($pixelTests) {
push @toolArgs, "--pixel-tests";
- push @toolArgs, ("--width", $maxWidth) if $maxWidth;
- push @toolArgs, ("--height", $maxHeight) if $maxHeight;
}
push @toolArgs, "-";
More information about the webkit-changes
mailing list