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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 : autostart_test_server_(true), 1041 : autostart_test_server_(true),
1042 prerender_contents_factory_(NULL), 1042 prerender_contents_factory_(NULL),
1043 #if defined(FULL_SAFE_BROWSING) 1043 #if defined(FULL_SAFE_BROWSING)
1044 safe_browsing_factory_(new TestSafeBrowsingServiceFactory()), 1044 safe_browsing_factory_(new TestSafeBrowsingServiceFactory()),
1045 #endif 1045 #endif
1046 call_javascript_(true), 1046 call_javascript_(true),
1047 check_load_events_(true), 1047 check_load_events_(true),
1048 loader_path_("files/prerender/prerender_loader.html"), 1048 loader_path_("files/prerender/prerender_loader.html"),
1049 explicitly_set_browser_(NULL) {} 1049 explicitly_set_browser_(NULL) {}
1050 1050
1051 virtual ~PrerenderBrowserTest() {} 1051 ~PrerenderBrowserTest() override {}
1052 1052
1053 content::SessionStorageNamespace* GetSessionStorageNamespace() const { 1053 content::SessionStorageNamespace* GetSessionStorageNamespace() const {
1054 WebContents* web_contents = GetActiveWebContents(); 1054 WebContents* web_contents = GetActiveWebContents();
1055 if (!web_contents) 1055 if (!web_contents)
1056 return NULL; 1056 return NULL;
1057 return web_contents->GetController().GetDefaultSessionStorageNamespace(); 1057 return web_contents->GetController().GetDefaultSessionStorageNamespace();
1058 } 1058 }
1059 1059
1060 void SetUpInProcessBrowserTestFixture() override { 1060 void SetUpInProcessBrowserTestFixture() override {
1061 #if defined(FULL_SAFE_BROWSING) 1061 #if defined(FULL_SAFE_BROWSING)
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLT", 1); 3520 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLT", 1);
3521 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLTMatched", 3521 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLTMatched",
3522 0); 3522 0);
3523 histogram_tester().ExpectTotalCount( 3523 histogram_tester().ExpectTotalCount(
3524 "Prerender.websame_PerceivedPLTMatchedComplete", 1); 3524 "Prerender.websame_PerceivedPLTMatchedComplete", 1);
3525 } 3525 }
3526 3526
3527 class PrerenderBrowserTestWithNaCl : public PrerenderBrowserTest { 3527 class PrerenderBrowserTestWithNaCl : public PrerenderBrowserTest {
3528 public: 3528 public:
3529 PrerenderBrowserTestWithNaCl() {} 3529 PrerenderBrowserTestWithNaCl() {}
3530 virtual ~PrerenderBrowserTestWithNaCl() {} 3530 ~PrerenderBrowserTestWithNaCl() override {}
3531 3531
3532 void SetUpCommandLine(CommandLine* command_line) override { 3532 void SetUpCommandLine(CommandLine* command_line) override {
3533 PrerenderBrowserTest::SetUpCommandLine(command_line); 3533 PrerenderBrowserTest::SetUpCommandLine(command_line);
3534 command_line->AppendSwitch(switches::kEnableNaCl); 3534 command_line->AppendSwitch(switches::kEnableNaCl);
3535 } 3535 }
3536 }; 3536 };
3537 3537
3538 // Check that NaCl plugins work when enabled, with prerendering. 3538 // Check that NaCl plugins work when enabled, with prerendering.
3539 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTestWithNaCl, 3539 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTestWithNaCl,
3540 PrerenderNaClPluginEnabled) { 3540 PrerenderNaClPluginEnabled) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3608 // Test interaction of the webNavigation and tabs API with prerender. 3608 // Test interaction of the webNavigation and tabs API with prerender.
3609 class PrerenderBrowserTestWithExtensions : public PrerenderBrowserTest, 3609 class PrerenderBrowserTestWithExtensions : public PrerenderBrowserTest,
3610 public ExtensionApiTest { 3610 public ExtensionApiTest {
3611 public: 3611 public:
3612 PrerenderBrowserTestWithExtensions() { 3612 PrerenderBrowserTestWithExtensions() {
3613 // The individual tests start the test server through ExtensionApiTest, so 3613 // The individual tests start the test server through ExtensionApiTest, so
3614 // the port number can be passed through to the extension. 3614 // the port number can be passed through to the extension.
3615 autostart_test_server_ = false; 3615 autostart_test_server_ = false;
3616 } 3616 }
3617 3617
3618 virtual void SetUp() override { 3618 void SetUp() override { PrerenderBrowserTest::SetUp(); }
James Hawkins 2014/10/28 23:04:23 Undo this pull-up.
3619 PrerenderBrowserTest::SetUp();
3620 }
3621 3619
3622 void SetUpCommandLine(CommandLine* command_line) override { 3620 void SetUpCommandLine(CommandLine* command_line) override {
3623 PrerenderBrowserTest::SetUpCommandLine(command_line); 3621 PrerenderBrowserTest::SetUpCommandLine(command_line);
3624 ExtensionApiTest::SetUpCommandLine(command_line); 3622 ExtensionApiTest::SetUpCommandLine(command_line);
3625 } 3623 }
3626 3624
3627 void SetUpInProcessBrowserTestFixture() override { 3625 void SetUpInProcessBrowserTestFixture() override {
3628 PrerenderBrowserTest::SetUpInProcessBrowserTestFixture(); 3626 PrerenderBrowserTest::SetUpInProcessBrowserTestFixture();
3629 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 3627 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
3630 } 3628 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 TestShouldDisableLocalPredictorPreferenceNetworkMatrix( 4596 TestShouldDisableLocalPredictorPreferenceNetworkMatrix(
4599 true /*preference_wifi_network_wifi*/, 4597 true /*preference_wifi_network_wifi*/,
4600 true /*preference_wifi_network_4g*/, 4598 true /*preference_wifi_network_4g*/,
4601 true /*preference_always_network_wifi*/, 4599 true /*preference_always_network_wifi*/,
4602 false /*preference_always_network_4g*/, 4600 false /*preference_always_network_4g*/,
4603 true /*preference_never_network_wifi*/, 4601 true /*preference_never_network_wifi*/,
4604 true /*preference_never_network_4g*/); 4602 true /*preference_never_network_4g*/);
4605 } 4603 }
4606 4604
4607 } // namespace prerender 4605 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698