Reverted r171893, because it broke http/tests/appcache/different-https-origin-resourc...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 01:01:00 +0000 (01:01 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 01:01:00 +0000 (01:01 +0000)
which loads HTTPS content without calling the delegate.

Rubber-stamped by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171902 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm

index 024109f..ec6f5f0 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-31  Dan Bernstein  <mitz@apple.com>
+
+        Reverted r171893, because it broke http/tests/appcache/different-https-origin-resource-main.html,
+        which loads HTTPS content without calling the delegate.
+
+        Rubber-stamped by Alexey Proskuryakov.
+
+        * WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
+        (WTR::InjectedBundle::platformInitialize):
+        * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+        (WTR::InjectedBundle::platformInitialize):
+
 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
 
         Unreviewed typo correction (and build fix).
index 21de3d2..cd68ba1 100644 (file)
 
 #import <Foundation/Foundation.h>
 
+@interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
++(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
+@end
+
 namespace WTR {
 
 void InjectedBundle::platformInitialize(WKTypeRef)
@@ -35,6 +39,9 @@ void InjectedBundle::platformInitialize(WKTypeRef)
         nil];
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
+
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"localhost"];
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"127.0.0.1"];
 }
 
 } // namespace WTR
index 4f5c47e..396c166 100644 (file)
 
 #import <Foundation/Foundation.h>
 
+@interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
++(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
+@end
+
 @interface NSSound (Details)
 + (void)_setAlertType:(NSUInteger)alertType;
 @end
@@ -66,6 +70,9 @@ void InjectedBundle::platformInitialize(WKTypeRef)
     // A distributed notification is delivered to all applications, but it should be harmless, and it's the only way to update all underlying frameworks anyway.
     [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"AppleAquaAntiAliasingChanged" object:nil userInfo:nil deliverImmediately:YES];
 
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"localhost"];
+    [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"127.0.0.1"];
+
     [NSSound _setAlertType:0];
 }