Changeset 267415 in webkit
- Timestamp:
- Sep 22, 2020, 9:40:21 AM (6 years ago)
- Location:
- branches/safari-610-branch/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610-branch/Tools/ChangeLog
r267258 r267415 1 2020-09-22 Ryan Haddad <ryanhaddad@apple.com> 2 3 Cherry-pick r267278. rdar://problem/69374947 4 5 Make TLSVersion.NetworkSession API test more robust 6 https://bugs.webkit.org/show_bug.cgi?id=216704 7 <rdar://problem/68643674> 8 9 Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-18 10 Reviewed by Tim Horton. 11 12 r265573 made preconnect attempts to legacy TLS servers fail. 13 This caused the TLSVersion.NetworkSession to assert because the first connection attempt would fail 14 (and the second would succeed if it was supposed to succeed with the conditions in the test). 15 The test calls waitForDidFailProvisionalNavigation in cases where it is supposed to fail and 16 waitForDidFinishNavigation in cases where it supposed to succeed. 17 Like I did in r266100 with another test, use HTTPServer which allows a variable number of connection attempts. 18 19 * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: 20 (TestWebKitAPI::TEST): 21 22 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267278 268f45cc-cd09-0410-ab3c-d52691b4dbfc 23 24 2020-09-18 Alex Christensen <achristensen@webkit.org> 25 26 Make TLSVersion.NetworkSession API test more robust 27 https://bugs.webkit.org/show_bug.cgi?id=216704 28 <rdar://problem/68643674> 29 30 Reviewed by Tim Horton. 31 32 r265573 made preconnect attempts to legacy TLS servers fail. 33 This caused the TLSVersion.NetworkSession to assert because the first connection attempt would fail 34 (and the second would succeed if it was supposed to succeed with the conditions in the test). 35 The test calls waitForDidFailProvisionalNavigation in cases where it is supposed to fail and 36 waitForDidFinishNavigation in cases where it supposed to succeed. 37 Like I did in r266100 with another test, use HTTPServer which allows a variable number of connection attempts. 38 39 * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: 40 (TestWebKitAPI::TEST): 41 1 42 2020-09-17 Alan Coon <alancoon@apple.com> 2 43 -
branches/safari-610-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm
r266423 r267415 167 167 TEST(TLSVersion, NetworkSession) 168 168 { 169 HTTPServer server(HTTPServer::respondWithOK, HTTPServer::Protocol::HttpsWithLegacyTLS); 169 170 static auto delegate = adoptNS([TestNavigationDelegate new]); 170 171 auto makeWebViewWith = [&] (WKWebsiteDataStore *store) { … … 180 181 }; 181 182 { 182 TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK, tls1_1);183 183 auto webView = makeWebViewWith([WKWebsiteDataStore defaultDataStore]); 184 184 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 186 186 } 187 187 { 188 TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK, tls1_1);189 188 auto webView = makeWebViewWith([WKWebsiteDataStore nonPersistentDataStore]); 190 189 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 192 191 } 193 192 { 194 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {195 EXPECT_FALSE(ssl);196 }, tls1_1);197 193 auto configuration = adoptNS([[_WKWebsiteDataStoreConfiguration alloc] initNonPersistentConfiguration]); 198 194 [configuration setLegacyTLSEnabled:NO]; … … 204 200 [[NSUserDefaults standardUserDefaults] setBool:NO forKey:defaultsKey]; 205 201 { 206 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {207 EXPECT_FALSE(ssl);208 }, tls1_1);209 202 auto webView = makeWebViewWith([WKWebsiteDataStore defaultDataStore]); 210 203 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]]; … … 212 205 } 213 206 { 214 TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {215 EXPECT_FALSE(ssl);216 }, tls1_1);217 207 auto webView = makeWebViewWith([WKWebsiteDataStore nonPersistentDataStore]); 218 208 [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.