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

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: more curly braces 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/public/browser/navigation_entry.h" 48 #include "content/public/browser/navigation_entry.h"
49 #include "content/public/browser/render_process_host.h" 49 #include "content/public/browser/render_process_host.h"
50 #include "content/public/browser/render_view_host.h" 50 #include "content/public/browser/render_view_host.h"
51 #include "content/public/browser/ssl_status.h" 51 #include "content/public/browser/ssl_status.h"
52 #include "content/public/browser/storage_partition.h" 52 #include "content/public/browser/storage_partition.h"
53 #include "content/public/browser/web_contents.h" 53 #include "content/public/browser/web_contents.h"
54 #include "content/public/common/content_client.h" 54 #include "content/public/common/content_client.h"
55 #include "content/public/common/content_switches.h" 55 #include "content/public/common/content_switches.h"
56 #include "content/public/common/referrer.h" 56 #include "content/public/common/referrer.h"
57 #include "content/public/common/resource_type.h" 57 #include "content/public/common/resource_type.h"
58 #include "content/public/common/security_style.h"
59 #include "content/public/common/web_preferences.h" 58 #include "content/public/common/web_preferences.h"
60 #include "content/public/test/browser_test_utils.h" 59 #include "content/public/test/browser_test_utils.h"
61 #include "content/public/test/content_browser_test.h" 60 #include "content/public/test/content_browser_test.h"
62 #include "content/public/test/content_browser_test_utils.h" 61 #include "content/public/test/content_browser_test_utils.h"
63 #include "content/shell/browser/shell.h" 62 #include "content/shell/browser/shell.h"
64 #include "content/shell/browser/shell_content_browser_client.h" 63 #include "content/shell/browser/shell_content_browser_client.h"
65 #include "content/test/test_content_browser_client.h" 64 #include "content/test/test_content_browser_client.h"
66 #include "net/log/net_log_with_source.h" 65 #include "net/log/net_log_with_source.h"
67 #include "net/test/embedded_test_server/embedded_test_server.h" 66 #include "net/test/embedded_test_server/embedded_test_server.h"
68 #include "net/test/embedded_test_server/http_request.h" 67 #include "net/test/embedded_test_server/http_request.h"
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 observer->Wait(); 1384 observer->Wait();
1386 1385
1387 const base::string16 title = base::ASCIIToUTF16("Title"); 1386 const base::string16 title = base::ASCIIToUTF16("Title");
1388 TitleWatcher title_watcher(shell()->web_contents(), title); 1387 TitleWatcher title_watcher(shell()->web_contents(), title);
1389 NavigateToURL(shell(), https_server.GetURL(kPageUrl)); 1388 NavigateToURL(shell(), https_server.GetURL(kPageUrl));
1390 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1389 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1391 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1390 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1392 ->DisplayedInsecureContent()); 1391 ->DisplayedInsecureContent());
1393 NavigationEntry* entry = 1392 NavigationEntry* entry =
1394 shell()->web_contents()->GetController().GetVisibleEntry(); 1393 shell()->web_contents()->GetController().GetVisibleEntry();
1395 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATED, entry->GetSSL().security_style); 1394 EXPECT_TRUE(entry->GetSSL().initialized);
1395 EXPECT_TRUE(
1396 https_server.GetCertificate()->Equals(entry->GetSSL().certificate.get()));
1397 EXPECT_EQ(0u, entry->GetSSL().cert_status);
1396 1398
1397 shell()->Close(); 1399 shell()->Close();
1398 1400
1399 base::RunLoop run_loop; 1401 base::RunLoop run_loop;
1400 public_context()->UnregisterServiceWorker( 1402 public_context()->UnregisterServiceWorker(
1401 https_server.GetURL(kPageUrl), 1403 https_server.GetURL(kPageUrl),
1402 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1404 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1403 run_loop.Run(); 1405 run_loop.Run();
1404 } 1406 }
1405 1407
(...skipping 11 matching lines...) Expand all
1417 observer->Wait(); 1419 observer->Wait();
1418 1420
1419 const base::string16 title = base::ASCIIToUTF16("Title"); 1421 const base::string16 title = base::ASCIIToUTF16("Title");
1420 TitleWatcher title_watcher(shell()->web_contents(), title); 1422 TitleWatcher title_watcher(shell()->web_contents(), title);
1421 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl)); 1423 NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl));
1422 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1424 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1423 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents()) 1425 EXPECT_FALSE(static_cast<WebContentsImpl*>(shell()->web_contents())
1424 ->DisplayedInsecureContent()); 1426 ->DisplayedInsecureContent());
1425 NavigationEntry* entry = 1427 NavigationEntry* entry =
1426 shell()->web_contents()->GetController().GetVisibleEntry(); 1428 shell()->web_contents()->GetController().GetVisibleEntry();
1427 EXPECT_EQ(SECURITY_STYLE_UNAUTHENTICATED, entry->GetSSL().security_style); 1429 EXPECT_TRUE(entry->GetSSL().initialized);
1430 EXPECT_FALSE(entry->GetSSL().certificate);
1428 1431
1429 shell()->Close(); 1432 shell()->Close();
1430 1433
1431 base::RunLoop run_loop; 1434 base::RunLoop run_loop;
1432 public_context()->UnregisterServiceWorker( 1435 public_context()->UnregisterServiceWorker(
1433 embedded_test_server()->GetURL(kPageUrl), 1436 embedded_test_server()->GetURL(kPageUrl),
1434 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure())); 1437 base::Bind(&ExpectResultAndRun, true, run_loop.QuitClosure()));
1435 run_loop.Run(); 1438 run_loop.Run();
1436 } 1439 }
1437 1440
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 ServiceWorkerV8CacheStrategiesNormalTest, 2068 ServiceWorkerV8CacheStrategiesNormalTest,
2066 ::testing::Values(true, false)); 2069 ::testing::Values(true, false));
2067 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2070 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2068 ServiceWorkerV8CacheStrategiesAggressiveTest, 2071 ServiceWorkerV8CacheStrategiesAggressiveTest,
2069 ::testing::Values(true, false)); 2072 ::testing::Values(true, false));
2070 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, 2073 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest,
2071 ServiceWorkerDisableWebSecurityTest, 2074 ServiceWorkerDisableWebSecurityTest,
2072 ::testing::Values(true, false)); 2075 ::testing::Values(true, false));
2073 2076
2074 } // namespace content 2077 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_handler.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698