Simplify how Content*Client interfaces are created. Instead of depending on the embedder to know when to create and set them and to handle special cases like zygote/single-process, directly ask the embedder to create an instance of a specific type. Also, if the embedder doesn't return an instance create the empty version.
Remove MockContentRendererClient since it existed before ContentRendererClient had an implementation and has no need anymore. Rename MockContentBrowserClient to TestContentBrowserClient to better reflect how it's used.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/10479023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140524 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc
index 39d50d3..77be482 100644
--- a/content/browser/child_process_security_policy_unittest.cc
+++ b/content/browser/child_process_security_policy_unittest.cc
@@ -9,9 +9,9 @@
#include "base/file_path.h"
#include "base/platform_file.h"
#include "content/browser/child_process_security_policy_impl.h"
-#include "content/browser/mock_content_browser_client.h"
#include "content/common/test_url_constants.h"
#include "content/public/common/url_constants.h"
+#include "content/test/test_content_browser_client.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +21,7 @@
const int kWorkerRendererID = kRendererID + 1;
class ChildProcessSecurityPolicyTestBrowserClient
- : public content::MockContentBrowserClient {
+ : public content::TestContentBrowserClient {
public:
ChildProcessSecurityPolicyTestBrowserClient() {}
@@ -50,7 +50,7 @@
virtual void SetUp() {
old_browser_client_ = content::GetContentClient()->browser();
- content::GetContentClient()->set_browser(&test_browser_client_);
+ content::GetContentClient()->set_browser_for_testing(&test_browser_client_);
// Claim to always handle chrome:// URLs because the CPSP's notion of
// allowing WebUI bindings is hard-wired to this particular scheme.
@@ -59,7 +59,7 @@
virtual void TearDown() {
test_browser_client_.ClearSchemes();
- content::GetContentClient()->set_browser(old_browser_client_);
+ content::GetContentClient()->set_browser_for_testing(old_browser_client_);
}
protected: