[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mrowe at apple.com mrowe at apple.com
Wed Apr 7 23:30:09 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 78409fde28167e0fe9ef18bfbde5db870b5b0666
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 11 01:29:33 2009 +0000

    <http://webkit.org/b/31200> Tests in http/tests/security/mixedContent start to fail when new tests are added
    
    Reviewed by Sam Weinig.
    
    The first request to an HTTPS URL results in didFailProvisionalLoadWithError being called with an error
    about the validity of the self-signed certificates used in the regression tests.  We would then add the
    host to the ignore list for SSL certificate errors and retry the request.  If this happened during a test
    that had enabled frame load delegate logging this would result in extra log messages being generated,
    causing the test to fail.
    
    We address this by explicitly ignoring SSL certificate errors for localhost and 127.0.0.1 before running any
    tests.
    
    * DumpRenderTree/mac/DumpRenderTree.mm:
    (dumpRenderTree):
    * DumpRenderTree/mac/FrameLoadDelegate.mm:
    (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 37a3e99..9578bdc 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2009-11-10  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        <http://webkit.org/b/31200> Tests in http/tests/security/mixedContent start to fail when new tests are added
+
+        The first request to an HTTPS URL results in didFailProvisionalLoadWithError being called with an error
+        about the validity of the self-signed certificates used in the regression tests.  We would then add the
+        host to the ignore list for SSL certificate errors and retry the request.  If this happened during a test
+        that had enabled frame load delegate logging this would result in extra log messages being generated,
+        causing the test to fail.
+
+        We address this by explicitly ignoring SSL certificate errors for localhost and 127.0.0.1 before running any
+        tests.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (dumpRenderTree):
+        * DumpRenderTree/mac/FrameLoadDelegate.mm:
+        (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+
 2009-11-10  Andras Becsi  <becsi.andras at stud.u-szeged.hu>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 98f4f9c..92b22fa 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -87,6 +87,10 @@ using namespace std;
 @interface DumpRenderTreeEvent : NSEvent
 @end
 
+ at interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
++(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
+ at end
+
 static void runTest(const string& testPathOrURL);
 
 // Deciding when it's OK to dump out the state is a bit tricky.  All these must be true:
@@ -596,9 +600,13 @@ void dumpRenderTree(int argc, const char *argv[])
     mainFrame = [webView mainFrame];
 
     [[NSURLCache sharedURLCache] removeAllCachedResponses];
-
     [WebCache empty];
-     
+
+    // <http://webkit.org/b/31200> In order to prevent extra frame load delegate logging being generated if the first test to use SSL
+    // is set to log frame load delegate calls we ignore SSL certificate errors on localhost and 127.0.0.1.
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"localhost"];
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"127.0.0.1"];
+
     // <rdar://problem/5222911>
     testStringByEvaluatingJavaScriptFromString();
 
diff --git a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
index 2838d2e..d8a444a 100644
--- a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
@@ -51,10 +51,6 @@
 #import <WebKit/WebSecurityOriginPrivate.h>
 #import <wtf/Assertions.h>
 
- at interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
-+(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
- at end
-
 @interface NSURL (DRTExtras)
 - (NSString *)_drt_descriptionSuitableForTestResult;
 @end
@@ -182,13 +178,15 @@
 {
     if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
         NSString *string = [NSString stringWithFormat:@"%@ - didFailProvisionalLoadWithError", [frame _drt_descriptionSuitableForTestResult]];
-        printf ("%s\n", [string UTF8String]);
+        printf("%s\n", [string UTF8String]);
     }
 
     if ([error domain] == NSURLErrorDomain && ([error code] == NSURLErrorServerCertificateHasUnknownRoot || [error code] == NSURLErrorServerCertificateUntrusted)) {
-        NSURL *failedURL = [[error userInfo] objectForKey:@"NSErrorFailingURLKey"];
-        [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[failedURL _web_hostString]];
-        [frame loadRequest:[[[[frame provisionalDataSource] request] mutableCopy] autorelease]];
+        // <http://webkit.org/b/31200> In order to prevent extra frame load delegate logging being generated if the first test to use SSL
+        // is set to log frame load delegate calls we ignore SSL certificate errors on localhost and 127.0.0.1 from within dumpRenderTree.
+        // Those are the only hosts that we use SSL with at present.  If we hit this code path then we've found another host that we need
+        // to apply the workaround to.
+        ASSERT_NOT_REACHED();
         return;
     }
     

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list