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

Side by Side Diff: content/browser/site_instance_impl_unittest.cc

Issue 678073006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bogus formatting 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/browsing_instance.h" 10 #include "content/browser/browsing_instance.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 class SiteInstanceTest : public testing::Test { 83 class SiteInstanceTest : public testing::Test {
84 public: 84 public:
85 SiteInstanceTest() 85 SiteInstanceTest()
86 : ui_thread_(BrowserThread::UI, &message_loop_), 86 : ui_thread_(BrowserThread::UI, &message_loop_),
87 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, 87 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING,
88 &message_loop_), 88 &message_loop_),
89 io_thread_(BrowserThread::IO, &message_loop_), 89 io_thread_(BrowserThread::IO, &message_loop_),
90 old_browser_client_(NULL) { 90 old_browser_client_(NULL) {
91 } 91 }
92 92
93 virtual void SetUp() { 93 void SetUp() override {
94 old_browser_client_ = SetBrowserClientForTesting(&browser_client_); 94 old_browser_client_ = SetBrowserClientForTesting(&browser_client_);
95 url::AddStandardScheme(kPrivilegedScheme); 95 url::AddStandardScheme(kPrivilegedScheme);
96 url::AddStandardScheme(kChromeUIScheme); 96 url::AddStandardScheme(kChromeUIScheme);
97 97
98 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_); 98 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_);
99 } 99 }
100 100
101 virtual void TearDown() { 101 void TearDown() override {
102 // Ensure that no RenderProcessHosts are left over after the tests. 102 // Ensure that no RenderProcessHosts are left over after the tests.
103 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd()); 103 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd());
104 104
105 SetBrowserClientForTesting(old_browser_client_); 105 SetBrowserClientForTesting(old_browser_client_);
106 SiteInstanceImpl::set_render_process_host_factory(NULL); 106 SiteInstanceImpl::set_render_process_host_factory(NULL);
107 107
108 // http://crbug.com/143565 found SiteInstanceTest leaking an 108 // http://crbug.com/143565 found SiteInstanceTest leaking an
109 // AppCacheDatabase. This happens because some part of the test indirectly 109 // AppCacheDatabase. This happens because some part of the test indirectly
110 // calls StoragePartitionImplMap::PostCreateInitialization(), which posts 110 // calls StoragePartitionImplMap::PostCreateInitialization(), which posts
111 // a task to the IO thread to create the AppCacheDatabase. Since the 111 // a task to the IO thread to create the AppCacheDatabase. Since the
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 EXPECT_TRUE(instance->GetSiteURL().is_empty()); 776 EXPECT_TRUE(instance->GetSiteURL().is_empty());
777 host.reset(instance->GetProcess()); 777 host.reset(instance->GetProcess());
778 778
779 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite( 779 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite(
780 browser_context.get(), GURL())); 780 browser_context.get(), GURL()));
781 781
782 DrainMessageLoops(); 782 DrainMessageLoops();
783 } 783 }
784 784
785 } // namespace content 785 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698