Title: [200504] trunk/Tools
Revision
200504
Author
[email protected]
Date
2016-05-05 19:40:50 -0700 (Thu, 05 May 2016)

Log Message

Improve HTTP test names in WebKitTestRunner's crash report information
https://bugs.webkit.org/show_bug.cgi?id=157389

Reviewed by Alex Christensen.

* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame): Added a FIXME.

* WebKitTestRunner/cocoa/CrashReporterInfo.mm:
(WTR::testDescription): Don't bail out if the port is neither 8000 nor 8443; we
use other port numbers too. For http tests, return the complete URL string, not
just the path.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (200503 => 200504)


--- trunk/Tools/ChangeLog	2016-05-06 02:33:20 UTC (rev 200503)
+++ trunk/Tools/ChangeLog	2016-05-06 02:40:50 UTC (rev 200504)
@@ -1,3 +1,18 @@
+2016-05-05  Alexey Proskuryakov  <[email protected]>
+
+        Improve HTTP test names in WebKitTestRunner's crash report information
+        https://bugs.webkit.org/show_bug.cgi?id=157389
+
+        Reviewed by Alex Christensen.
+
+        * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
+        (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame): Added a FIXME.
+
+        * WebKitTestRunner/cocoa/CrashReporterInfo.mm:
+        (WTR::testDescription): Don't bail out if the port is neither 8000 nor 8443; we
+        use other port numbers too. For http tests, return the complete URL string, not
+        just the path.
+
 2016-05-04  Alex Christensen  <[email protected]>
 
         Blocked redirected main resource requests need descriptive errors

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm (200503 => 200504)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm	2016-05-06 02:33:20 UTC (rev 200503)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm	2016-05-06 02:40:50 UTC (rev 200504)
@@ -42,6 +42,8 @@
     if (!WKBundleFrameIsMainFrame(frame))
         return;
 
+    // FIXME: We should not be changing test URL every time the test navigates. The current URL could be
+    // aditional information, but it shouldn't replace the initial test URL.
     setCrashReportApplicationSpecificInformationToURL(InjectedBundle::singleton().testRunner()->testURL());
 }
 

Modified: trunk/Tools/WebKitTestRunner/cocoa/CrashReporterInfo.mm (200503 => 200504)


--- trunk/Tools/WebKitTestRunner/cocoa/CrashReporterInfo.mm	2016-05-06 02:33:20 UTC (rev 200503)
+++ trunk/Tools/WebKitTestRunner/cocoa/CrashReporterInfo.mm	2016-05-06 02:40:50 UTC (rev 200504)
@@ -33,7 +33,7 @@
 
 namespace WTR {
 
-static String testPathFromURL(WKURLRef url)
+static String testDescription(WKURLRef url)
 {
     RetainPtr<CFURLRef> cfURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, url));
     if (!cfURL)
@@ -59,18 +59,18 @@
 
     RetainPtr<CFStringRef> hostCFString = adoptCF(CFURLCopyHostName(cfURL.get()));
     String hostString(hostCFString.get());
-    if (hostString == "127.0.0.1"  && (CFURLGetPortNumber(cfURL.get()) == 8000 || CFURLGetPortNumber(cfURL.get()) == 8443))
-        return pathString;
+    if (hostString != "127.0.0.1")
+        return String();
 
-    return String();
+    return CFURLGetString(cfURL.get());
 }
 
 void setCrashReportApplicationSpecificInformationToURL(WKURLRef url)
 {
-    String testPath = testPathFromURL(url);
-    if (!testPath.isNull()) {
+    String description = testDescription(url);
+    if (!description.isNull()) {
         String message("CRASHING TEST: ");
-        message = message + testPath;
+        message = message + description;
         WKSetCrashReportApplicationSpecificInformation(message.createCFString().get());
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to