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

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: rebase 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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 observer->Wait(); 1385 observer->Wait();
1386 1386
1387 const base::string16 title = base::ASCIIToUTF16("Title"); 1387 const base::string16 title = base::ASCIIToUTF16("Title");
1388 TitleWatcher title_watcher(shell()->web_contents(), title); 1388 TitleWatcher title_watcher(shell()->web_contents(), title);
1389 NavigateToURL(shell(), https_server.GetURL(kPageUrl)); 1389 NavigateToURL(shell(), https_server.GetURL(kPageUrl));
1390 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1390 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1391 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1391 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1392 ->DisplayedInsecureContent()); 1392 ->DisplayedInsecureContent());
1393 NavigationEntry* entry = 1393 NavigationEntry* entry =
1394 shell()->web_contents()->GetController().GetVisibleEntry(); 1394 shell()->web_contents()->GetController().GetVisibleEntry();
1395 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATED, entry->GetSSL().security_style); 1395 EXPECT_TRUE(entry->GetSSL().initialized);
1396 EXPECT_TRUE(
1397 https_server.GetCertificate()->Equals(entry->GetSSL().certificate.get()));
1398 EXPECT_EQ(0u, entry->GetSSL().cert_status);
1396 1399
1397 shell()->Close(); 1400 shell()->Close();
1398 1401
1399 base::RunLoop run_loop; 1402 base::RunLoop run_loop;
1400 public_context()->UnregisterServiceWorker( 1403 public_context()->UnregisterServiceWorker(
1401 https_server.GetURL(kPageUrl), 1404 https_server.GetURL(kPageUrl),
1402 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1405 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1403 run_loop.Run(); 1406 run_loop.Run();
1404 } 1407 }
1405 1408
(...skipping 11 matching lines...) Expand all
1417 observer->Wait(); 1420 observer->Wait();
1418 1421
1419 const base::string16 title = base::ASCIIToUTF16("Title"); 1422 const base::string16 title = base::ASCIIToUTF16("Title");
1420 TitleWatcher title_watcher(shell()->web_contents(), title); 1423 TitleWatcher title_watcher(shell()->web_contents(), title);
1421 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl)); 1424 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl));
1422 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1425 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1423 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1426 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1424 ->DisplayedInsecureContent()); 1427 ->DisplayedInsecureContent());
1425 NavigationEntry* entry = 1428 NavigationEntry* entry =
1426 shell()->web_contents()->GetController().GetVisibleEntry(); 1429 shell()->web_contents()->GetController().GetVisibleEntry();
1427 EXPECT_EQ(SECURITY_STYLE_UNAUTHENTICATED, entry->GetSSL().security_style); 1430 EXPECT_TRUE(entry->GetSSL().initialized);
1431 EXPECT_FALSE(entry->GetSSL().certificate);
1428 1432
1429 shell()->Close(); 1433 shell()->Close();
1430 1434
1431 base::RunLoop run_loop; 1435 base::RunLoop run_loop;
1432 public_context()->UnregisterServiceWorker( 1436 public_context()->UnregisterServiceWorker(
1433 embedded_test_server()->GetURL(kPageUrl), 1437 embedded_test_server()->GetURL(kPageUrl),
1434 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1438 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1435 run_loop.Run(); 1439 run_loop.Run();
1436 } 1440 }
1437 1441
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 ServiceWorkerV8CacheStrategiesNormalTest, 2069 ServiceWorkerV8CacheStrategiesNormalTest,
2066 ::testing::Values(true, false)); 2070 ::testing::Values(true, false));
2067 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2071 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2068 ServiceWorkerV8CacheStrategiesAggressiveTest, 2072 ServiceWorkerV8CacheStrategiesAggressiveTest,
2069 ::testing::Values(true, false)); 2073 ::testing::Values(true, false));
2070 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2074 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2071 ServiceWorkerDisableWebSecurityTest, 2075 ServiceWorkerDisableWebSecurityTest,
2072 ::testing::Values(true, false)); 2076 ::testing::Values(true, false));
2073 2077
2074 } // namespace content 2078 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698