summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_command_controller_unittest.cc
diff options
context:
space:
mode:
authordconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 17:16:26 +0000
committerdconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 17:16:26 +0000
commitcbed02ae31011f741d1341472abc0108cf42b148 (patch)
treec3ade71d330d55748c8894ee305eba5fe956f34b /chrome/browser/ui/browser_command_controller_unittest.cc
parent10890e831f5591fc9a1f3c81ae9a04ecf171d360 (diff)
downloadchromium_src-cbed02ae31011f741d1341472abc0108cf42b148.zip
chromium_src-cbed02ae31011f741d1341472abc0108cf42b148.tar.gz
chromium_src-cbed02ae31011f741d1341472abc0108cf42b148.tar.bz2
Make TestingProfile auto-create incognito profiles.
Previously, tests that involved incognito profiles needed to manually create them and add them to the parent profile before GetOffTheRecordProfile was ever called. However, the documentation for Profile explicitly states that the incognito profile will be created if it doesn't already exist when GetOffTheRecordProfile is called. Further, it was prohibitvely invasive to test code that creates a profile and expects to be able to do something with its associated incognito profile. This commit also updates existing tests to remove unnecessary manual incognito profile creation. BUG=318803 R=atwilson@chromium.org, dpolukhin@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/181403006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller_unittest.cc')
-rw-r--r--chrome/browser/ui/browser_command_controller_unittest.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
index 16450fd..5a12f2b 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -240,16 +240,8 @@ TEST_F(BrowserCommandControllerTest, AvatarMenuAlwaysDisabledInIncognitoMode) {
ASSERT_TRUE(testing_profile_manager.SetUp());
// Set up a profile with an off the record profile.
- TestingProfile::Builder otr_builder;
- otr_builder.SetIncognito();
- scoped_ptr<TestingProfile> otr_profile(otr_builder.Build());
-
TestingProfile::Builder normal_builder;
scoped_ptr<TestingProfile> original_profile = normal_builder.Build();
- otr_profile->SetOriginalProfile(original_profile.get());
- EXPECT_EQ(otr_profile->GetOriginalProfile(), original_profile.get());
-
- original_profile->SetOffTheRecordProfile(otr_profile.PassAs<Profile>());
// Create a new browser based on the off the record profile.
Browser::CreateParams profile_params(