Revert some code accidentally committed with r244653
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2019 18:15:47 +0000 (18:15 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2019 18:15:47 +0000 (18:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197131

* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):

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

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm

index b5e1c97..c1b53e7 100644 (file)
@@ -1,5 +1,13 @@
 2019-04-25  Alex Christensen  <achristensen@webkit.org>
 
+        Revert some code accidentally committed with r244653
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
+        (TestWebKitAPI::TEST):
+
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
         Start using C++17
         https://bugs.webkit.org/show_bug.cgi?id=197131
 
index 146bcc7..56bf9fd 100644 (file)
 
 #import "TCPServer.h"
 #import "Utilities.h"
-#import <WebKit/WKProcessPoolPrivate.h>
 #import <WebKit/WKWebsiteDataStorePrivate.h>
 #import <WebKit/WebKit.h>
-#import <WebKit/_WKProcessPoolConfiguration.h>
 #import <WebKit/_WKWebsiteDataStoreConfiguration.h>
 #import <wtf/RetainPtr.h>
 
@@ -66,26 +64,16 @@ TEST(WebKit, HTTPSProxy)
 
         const char* reply = ""
         "HTTP/1.1 200 OK\r\n"
-        "Strict-Transport-Security: max-age=16070400; includeSubDomains\r\n"
         "Content-Length: 34\r\n\r\n"
         "<script>alert('success!')</script>";
         auto writeResult = SSL_write(ssl, reply, strlen(reply));
         ASSERT_UNUSED(writeResult, writeResult == static_cast<int>(strlen(reply)));
     });
 
-    RetainPtr<NSString> tempDir = NSTemporaryDirectory();
-    WTFLogAlways("ORIGINAL TEMP DIR %@", tempDir.get());
-    if ([tempDir hasSuffix:@"/"])
-        tempDir = [tempDir substringWithRange:NSMakeRange(0, [tempDir length] - 1)];
-    
-    WTFLogAlways("TEMP DIR %@", tempDir.get());
-    auto poolConfiguration = adoptNS([_WKProcessPoolConfiguration new]);
-    [poolConfiguration setHSTSStorageDirectory:tempDir.get()];
     auto storeConfiguration = adoptNS([_WKWebsiteDataStoreConfiguration new]);
     [storeConfiguration setHTTPSProxy:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
     auto viewConfiguration = adoptNS([WKWebViewConfiguration new]);
     [viewConfiguration setWebsiteDataStore:[[[WKWebsiteDataStore alloc] _initWithConfiguration:storeConfiguration.get()] autorelease]];
-    [viewConfiguration setProcessPool:[[[WKProcessPool alloc] _initWithConfiguration:poolConfiguration.get()] autorelease]];
     auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:viewConfiguration.get()]);
     auto delegate = adoptNS([ProxyDelegate new]);
     [webView setNavigationDelegate:delegate.get()];
@@ -93,13 +81,6 @@ TEST(WebKit, HTTPSProxy)
 
     [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://example.com/"]]];
     TestWebKitAPI::Util::run(&receivedAlert);
-    
-    RetainPtr<NSString> filePath = [tempDir stringByAppendingPathComponent:@"HSTS.plist"];
-    WTFLogAlways("WAITING FOR FILE TO BE WRITTEN TO %@", filePath.get());
-    while (![[NSFileManager defaultManager] fileExistsAtPath:filePath.get()])
-        TestWebKitAPI::Util::spinRunLoop();
-    [[NSFileManager defaultManager] removeItemAtPath:filePath.get() error:nil];
-    WTFLogAlways("DONE");
 }
 
 } // namespace TestWebKitAPI