Title: [99098] trunk/Tools
Revision
99098
Author
[email protected]
Date
2011-11-02 14:43:15 -0700 (Wed, 02 Nov 2011)

Log Message

Make the main frame's base path more explicit in _drt_descriptionSuitableForTestResult
https://bugs.webkit.org/show_bug.cgi?id=71351

Reviewed by Darin Adler.

Add the delimiter "/" at the end of the path instead of adding +1 when using
the path.

* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[NSURL _drt_descriptionSuitableForTestResult]):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (99097 => 99098)


--- trunk/Tools/ChangeLog	2011-11-02 21:36:20 UTC (rev 99097)
+++ trunk/Tools/ChangeLog	2011-11-02 21:43:15 UTC (rev 99098)
@@ -1,3 +1,16 @@
+2011-11-02  Benjamin Poulain  <[email protected]>
+
+        Make the main frame's base path more explicit in _drt_descriptionSuitableForTestResult
+        https://bugs.webkit.org/show_bug.cgi?id=71351
+
+        Reviewed by Darin Adler.
+
+        Add the delimiter "/" at the end of the path instead of adding +1 when using
+        the path.
+
+        * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+        (-[NSURL _drt_descriptionSuitableForTestResult]):
+
 2011-11-02  Tom Sepez  <[email protected]>
 
         XSSAuditor is silent

Modified: trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm (99097 => 99098)


--- trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm	2011-11-02 21:36:20 UTC (rev 99097)
+++ trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm	2011-11-02 21:43:15 UTC (rev 99098)
@@ -82,11 +82,10 @@
         dataSource = [mainFrame provisionalDataSource];
 
     NSString *basePath = [[[[dataSource request] URL] path] stringByDeletingLastPathComponent];
+    basePath = [basePath stringByAppendingString:@"/"];
 
-    if ([[self path] hasPrefix:basePath]) {
-        ASSERT([[self path] length] >= ([basePath length] + 1));
-        return [[self path] substringFromIndex:[basePath length] + 1];
-    }
+    if ([[self path] hasPrefix:basePath])
+        return [[self path] substringFromIndex:[basePath length]];
     return [self absoluteString];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to