Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 observer->Wait(); 1373 observer->Wait();
1374 1374
1375 const base::string16 title = base::ASCIIToUTF16("Title"); 1375 const base::string16 title = base::ASCIIToUTF16("Title");
1376 TitleWatcher title_watcher(shell()->web_contents(), title); 1376 TitleWatcher title_watcher(shell()->web_contents(), title);
1377 NavigateToURL(shell(), https_server.GetURL(kPageUrl)); 1377 NavigateToURL(shell(), https_server.GetURL(kPageUrl));
1378 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1378 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1379 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1379 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1380 ->DisplayedInsecureContent()); 1380 ->DisplayedInsecureContent());
1381 NavigationEntry* entry = 1381 NavigationEntry* entry =
1382 shell()->web_contents()->GetController().GetVisibleEntry(); 1382 shell()->web_contents()->GetController().GetVisibleEntry();
1383 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATED, entry->GetSSL().security_style); 1383 EXPECT_TRUE(entry->GetSSL().initialized);
1384 EXPECT_TRUE(
1385 https_server.GetCertificate()->Equals(entry->GetSSL().certificate.get()));
1386 EXPECT_EQ(0u, entry->GetSSL().cert_status);
1384 1387
1385 shell()->Close(); 1388 shell()->Close();
1386 1389
1387 base::RunLoop run_loop; 1390 base::RunLoop run_loop;
1388 public_context()->UnregisterServiceWorker( 1391 public_context()->UnregisterServiceWorker(
1389 https_server.GetURL(kPageUrl), 1392 https_server.GetURL(kPageUrl),
1390 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1393 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1391 run_loop.Run(); 1394 run_loop.Run();
1392 } 1395 }
1393 1396
(...skipping 11 matching lines...) Expand all
1405 observer->Wait(); 1408 observer->Wait();
1406 1409
1407 const base::string16 title = base::ASCIIToUTF16("Title"); 1410 const base::string16 title = base::ASCIIToUTF16("Title");
1408 TitleWatcher title_watcher(shell()->web_contents(), title); 1411 TitleWatcher title_watcher(shell()->web_contents(), title);
1409 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl)); 1412 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl));
1410 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1413 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1411 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1414 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1412 ->DisplayedInsecureContent()); 1415 ->DisplayedInsecureContent());
1413 NavigationEntry* entry = 1416 NavigationEntry* entry =
1414 shell()->web_contents()->GetController().GetVisibleEntry(); 1417 shell()->web_contents()->GetController().GetVisibleEntry();
1415 EXPECT_EQ(SECURITY_STYLE_UNAUTHENTICATED, entry->GetSSL().security_style); 1418 EXPECT_TRUE(entry->GetSSL().initialized);
1419 EXPECT_FALSE(entry->GetSSL().certificate);
1416 1420
1417 shell()->Close(); 1421 shell()->Close();
1418 1422
1419 base::RunLoop run_loop; 1423 base::RunLoop run_loop;
1420 public_context()->UnregisterServiceWorker( 1424 public_context()->UnregisterServiceWorker(
1421 embedded_test_server()->GetURL(kPageUrl), 1425 embedded_test_server()->GetURL(kPageUrl),
1422 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1426 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1423 run_loop.Run(); 1427 run_loop.Run();
1424 } 1428 }
1425 1429
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 2029
2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { 2030 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) {
2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; 2031 const char kPageUrl[] = "/service_worker/disable_web_security_update.html";
2028 const char kScopeUrl[] = "/service_worker/scope/"; 2032 const char kScopeUrl[] = "/service_worker/scope/";
2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; 2033 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js";
2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); 2034 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl);
2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); 2035 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl);
2032 } 2036 }
2033 2037
2034 } // namespace content 2038 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698