Changeset 244654 in webkit
- Timestamp:
- Apr 25, 2019 11:15:47 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r244653 r244654 1 2019-04-25 Alex Christensen <achristensen@webkit.org> 2 3 Revert some code accidentally committed with r244653 4 https://bugs.webkit.org/show_bug.cgi?id=197131 5 6 * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: 7 (TestWebKitAPI::TEST): 8 1 9 2019-04-25 Alex Christensen <achristensen@webkit.org> 2 10 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm
r244653 r244654 28 28 #import "TCPServer.h" 29 29 #import "Utilities.h" 30 #import <WebKit/WKProcessPoolPrivate.h>31 30 #import <WebKit/WKWebsiteDataStorePrivate.h> 32 31 #import <WebKit/WebKit.h> 33 #import <WebKit/_WKProcessPoolConfiguration.h>34 32 #import <WebKit/_WKWebsiteDataStoreConfiguration.h> 35 33 #import <wtf/RetainPtr.h> … … 67 65 const char* reply = "" 68 66 "HTTP/1.1 200 OK\r\n" 69 "Strict-Transport-Security: max-age=16070400; includeSubDomains\r\n"70 67 "Content-Length: 34\r\n\r\n" 71 68 "<script>alert('success!')</script>"; … … 74 71 }); 75 72 76 RetainPtr<NSString> tempDir = NSTemporaryDirectory();77 WTFLogAlways("ORIGINAL TEMP DIR %@", tempDir.get());78 if ([tempDir hasSuffix:@"/"])79 tempDir = [tempDir substringWithRange:NSMakeRange(0, [tempDir length] - 1)];80 81 WTFLogAlways("TEMP DIR %@", tempDir.get());82 auto poolConfiguration = adoptNS([_WKProcessPoolConfiguration new]);83 [poolConfiguration setHSTSStorageDirectory:tempDir.get()];84 73 auto storeConfiguration = adoptNS([_WKWebsiteDataStoreConfiguration new]); 85 74 [storeConfiguration setHTTPSProxy:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]; 86 75 auto viewConfiguration = adoptNS([WKWebViewConfiguration new]); 87 76 [viewConfiguration setWebsiteDataStore:[[[WKWebsiteDataStore alloc] _initWithConfiguration:storeConfiguration.get()] autorelease]]; 88 [viewConfiguration setProcessPool:[[[WKProcessPool alloc] _initWithConfiguration:poolConfiguration.get()] autorelease]];89 77 auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:viewConfiguration.get()]); 90 78 auto delegate = adoptNS([ProxyDelegate new]); … … 94 82 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://example.com/"]]]; 95 83 TestWebKitAPI::Util::run(&receivedAlert); 96 97 RetainPtr<NSString> filePath = [tempDir stringByAppendingPathComponent:@"HSTS.plist"];98 WTFLogAlways("WAITING FOR FILE TO BE WRITTEN TO %@", filePath.get());99 while (![[NSFileManager defaultManager] fileExistsAtPath:filePath.get()])100 TestWebKitAPI::Util::spinRunLoop();101 [[NSFileManager defaultManager] removeItemAtPath:filePath.get() error:nil];102 WTFLogAlways("DONE");103 84 } 104 85
Note: See TracChangeset
for help on using the changeset viewer.