Commit eb6a2a74 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Remove CreateGuestBrowser function from ChromeOS.

InProcessBrowserTest::CreateGuestBrowser does not work on ChromeOS and
to create a Guest browser, proper switches need to be added while
setting up the test.
The function is excluded from ChromeOS build.

Bug: 1125474
Change-Id: If14266e1a1372ebec4e4ae92c0fea16164d726f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490007
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820180}
parent 504f2c47
...@@ -474,7 +474,7 @@ IN_PROC_BROWSER_TEST_F(UkmBrowserTest, IncognitoPlusRegularCheck) { ...@@ -474,7 +474,7 @@ IN_PROC_BROWSER_TEST_F(UkmBrowserTest, IncognitoPlusRegularCheck) {
} }
// Make sure that UKM is disabled while a guest profile's window is open. // Make sure that UKM is disabled while a guest profile's window is open.
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(CHROME_OS)
IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusGuestCheck) { IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusGuestCheck) {
ukm::UkmTestHelper ukm_test_helper(GetUkmService()); ukm::UkmTestHelper ukm_test_helper(GetUkmService());
MetricsConsentOverride metrics_consent(true); MetricsConsentOverride metrics_consent(true);
...@@ -500,7 +500,7 @@ IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusGuestCheck) { ...@@ -500,7 +500,7 @@ IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusGuestCheck) {
harness->service()->GetUserSettings()->SetSyncRequested(false); harness->service()->GetUserSettings()->SetSyncRequested(false);
CloseBrowserSynchronously(regular_browser); CloseBrowserSynchronously(regular_browser);
} }
#endif // !defined(OS_ANDROID) #endif // !defined(OS_ANDROID) && !defined(CHROME_OS)
// Make sure that UKM is disabled while an non-sync profile's window is open. // Make sure that UKM is disabled while an non-sync profile's window is open.
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
......
...@@ -497,7 +497,7 @@ Browser* InProcessBrowserTest::CreateBrowserForApp(const std::string& app_name, ...@@ -497,7 +497,7 @@ Browser* InProcessBrowserTest::CreateBrowserForApp(const std::string& app_name,
} }
#endif // !defined(OS_MAC) #endif // !defined(OS_MAC)
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(CHROME_OS)
Browser* InProcessBrowserTest::CreateGuestBrowser() { Browser* InProcessBrowserTest::CreateGuestBrowser() {
// Get Guest profile. // Get Guest profile.
ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileManager* profile_manager = g_browser_process->profile_manager();
...@@ -518,7 +518,7 @@ Browser* InProcessBrowserTest::CreateGuestBrowser() { ...@@ -518,7 +518,7 @@ Browser* InProcessBrowserTest::CreateGuestBrowser() {
AddBlankTabAndShow(browser); AddBlankTabAndShow(browser);
return browser; return browser;
} }
#endif #endif // !defined(OS_ANDROID) && !defined(CHROME_OS)
void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
content::WindowedNotificationObserver observer( content::WindowedNotificationObserver observer(
......
...@@ -227,8 +227,11 @@ class InProcessBrowserTest : public content::BrowserTestBase { ...@@ -227,8 +227,11 @@ class InProcessBrowserTest : public content::BrowserTestBase {
// is omitted, the currently active profile will be used. // is omitted, the currently active profile will be used.
Browser* CreateIncognitoBrowser(Profile* profile = nullptr); Browser* CreateIncognitoBrowser(Profile* profile = nullptr);
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(CHROME_OS)
// Similar to |CreateBrowser|, but creates a Guest browser. // Similar to |CreateBrowser|, but creates a Guest browser.
// To create a Guest browser for ChromeOS, you need to add proper switches to
// commandline while setting up the test. For an example see
// AppListClientGuestModeBrowserTest::SetUpCommandLine.
Browser* CreateGuestBrowser(); Browser* CreateGuestBrowser();
#endif #endif
......
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