Commit 94a3752c authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove call to RegisterUserPrefsOnBrowserContextForTest

The preferences are already correctly registered as part of the
creation of the TestingProfile so there is no need to call this
method (it is deprecated).

Bug: 932534
Change-Id: I1898d7a55e21f2a6524df3d84d849fa428f9c944
Reviewed-on: https://chromium-review.googlesource.com/c/1474760
Commit-Queue: Drew Wilson <atwilson@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarDrew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632709}
parent f4fe5179
...@@ -168,8 +168,7 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsCreateDestroy) { ...@@ -168,8 +168,7 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsCreateDestroy) {
TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAdded) { TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAdded) {
TestingProfile profile; TestingProfile profile;
BackgroundContentsService service(&profile, command_line_.get()); BackgroundContentsService service(&profile, command_line_.get());
BackgroundContentsServiceFactory::GetInstance()
->RegisterUserPrefsOnBrowserContextForTest(&profile);
GURL orig_url; GURL orig_url;
GURL url("http://a/"); GURL url("http://a/");
GURL url2("http://a/"); GURL url2("http://a/");
...@@ -195,8 +194,6 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAdded) { ...@@ -195,8 +194,6 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAdded) {
TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAddedAndClosed) { TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAddedAndClosed) {
TestingProfile profile; TestingProfile profile;
BackgroundContentsService service(&profile, command_line_.get()); BackgroundContentsService service(&profile, command_line_.get());
BackgroundContentsServiceFactory::GetInstance()
->RegisterUserPrefsOnBrowserContextForTest(&profile);
GURL url("http://a/"); GURL url("http://a/");
MockBackgroundContents* contents = new MockBackgroundContents(&profile); MockBackgroundContents* contents = new MockBackgroundContents(&profile);
...@@ -216,8 +213,6 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAddedAndClosed) { ...@@ -216,8 +213,6 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsUrlAddedAndClosed) {
TEST_F(BackgroundContentsServiceTest, RestartBackgroundContents) { TEST_F(BackgroundContentsServiceTest, RestartBackgroundContents) {
TestingProfile profile; TestingProfile profile;
BackgroundContentsService service(&profile, command_line_.get()); BackgroundContentsService service(&profile, command_line_.get());
BackgroundContentsServiceFactory::GetInstance()
->RegisterUserPrefsOnBrowserContextForTest(&profile);
GURL url("http://a/"); GURL url("http://a/");
{ {
...@@ -248,8 +243,6 @@ TEST_F(BackgroundContentsServiceTest, RestartBackgroundContents) { ...@@ -248,8 +243,6 @@ TEST_F(BackgroundContentsServiceTest, RestartBackgroundContents) {
TEST_F(BackgroundContentsServiceTest, TestApplicationIDLinkage) { TEST_F(BackgroundContentsServiceTest, TestApplicationIDLinkage) {
TestingProfile profile; TestingProfile profile;
BackgroundContentsService service(&profile, command_line_.get()); BackgroundContentsService service(&profile, command_line_.get());
BackgroundContentsServiceFactory::GetInstance()
->RegisterUserPrefsOnBrowserContextForTest(&profile);
EXPECT_EQ(NULL, service.GetAppBackgroundContents("appid")); EXPECT_EQ(NULL, service.GetAppBackgroundContents("appid"));
MockBackgroundContents* contents = MockBackgroundContents* contents =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment