Changeset 267278 in webkit
- Timestamp:
- Sep 18, 2020, 1:15:50 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r267277 r267278 1 2020-09-18 Alex Christensen <achristensen@webkit.org> 2 3 Make TLSVersion.NetworkSession API test more robust 4 https://bugs.webkit.org/show_bug.cgi?id=216704 5 <rdar://problem/68643674> 6 7 Reviewed by Tim Horton. 8 9 r265573 made preconnect attempts to legacy TLS servers fail. 10 This caused the TLSVersion.NetworkSession to assert because the first connection attempt would fail 11 (and the second would succeed if it was supposed to succeed with the conditions in the test). 12 The test calls waitForDidFailProvisionalNavigation in cases where it is supposed to fail and 13 waitForDidFinishNavigation in cases where it supposed to succeed. 14 Like I did in r266100 with another test, use HTTPServer which allows a variable number of connection attempts. 15 16 * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: 17 (TestWebKitAPI::TEST): 18 1 19 2020-09-18 Aakash Jain <aakash_jain@apple.com> 2 20 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm
r266150 r267278 165 165 TEST(TLSVersion, NetworkSession) 166 166 { 167 HTTPServer server(HTTPServer::respondWithOK, HTTPServer::Protocol::HttpsWithLegacyTLS); 167 168 static auto delegate = adoptNS([TestNavigationDelegate new]); 168 169 auto makeWebViewWith = [&] (WKWebsiteDataStore *store) { … … 178 179 }; 179 180 { 180 TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK, tls1_1);181 181 auto webView = makeWebViewWith([WKWebsiteDataStore defaultDataStore]); 182 182 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 184 184 } 185 185 { 186 TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK, tls1_1);187 186 auto webView = makeWebViewWith([WKWebsiteDataStore nonPersistentDataStore]); 188 187 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 190 189 } 191 190 { 192 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {193 EXPECT_FALSE(ssl);194 }, tls1_1);195 191 auto configuration = adoptNS([[_WKWebsiteDataStoreConfiguration alloc] initNonPersistentConfiguration]); 196 192 [configuration setLegacyTLSEnabled:NO]; … … 202 198 [[NSUserDefaults standardUserDefaults] setBool:NO forKey:defaultsKey]; 203 199 { 204 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {205 EXPECT_FALSE(ssl);206 }, tls1_1);207 200 auto webView = makeWebViewWith([WKWebsiteDataStore defaultDataStore]); 208 201 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 210 203 } 211 204 { 212 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {213 EXPECT_FALSE(ssl);214 }, tls1_1);215 205 auto webView = makeWebViewWith([WKWebsiteDataStore nonPersistentDataStore]); 216 206 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]];
Note:
See TracChangeset
for help on using the changeset viewer.