- Layout test fix for mac. When dumped to the console local file paths
now only show the name of the resource not the whole path. This is to
make the results machine and OS independent.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:addMessageToConsole:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28712
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-14 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin.
+
+ - Layout test fix for mac. When dumped to the console local file paths
+ now only show the name of the resource not the whole path. This is to
+ make the results machine and OS independent.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:addMessageToConsole:]):
+
2007-12-13 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
{
NSString *message = [dictionary objectForKey:@"message"];
NSNumber *lineNumber = [dictionary objectForKey:@"lineNumber"];
-
+
+ NSRange range = [message rangeOfString:@"file://"];
+ if (range.location != NSNotFound) {
+ range.length = [message length] - range.location;
+ message = [message stringByReplacingCharactersInRange:range withString:[message lastPathComponent]];
+ }
+
printf ("CONSOLE MESSAGE: line %d: %s\n", [lineNumber intValue], [message UTF8String]);
}