Commit 4be572b9 authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

Fix...

Fix ExtensionWebRequestApiTest.WebRequestApiDoesNotCrashOnErrorAfterProfileDestroyed with network service on chromeos.

This fixes ExtensionWebRequestApiTest
WebRequestApiDoesNotCrashOnErrorAfterProfileDestroyed on chromeos with
the network service enabled and removes it from the buildbot filter.

Profiles in chromeos have to be associated with a user_manager::User
unless it's the signin or lock screen profile. This makes
chromeos::ProfileHelper always return the primary User when queried,
which makes ProfileImpl think the new profile is associated with a
user.

Change-Id: Ic7a707da97891d6e86e5bb2b3a29a2f931f45429
Reviewed-on: https://chromium-review.googlesource.com/c/1260362Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597343}
parent 81986bb5
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
#include "third_party/blink/public/platform/web_input_event.h" #include "third_party/blink/public/platform/web_input_event.h"
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chromeos/login/login_state.h" #include "chromeos/login/login_state.h"
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
...@@ -1671,6 +1672,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, ...@@ -1671,6 +1672,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
// Create a profile that will be destroyed later. // Create a profile that will be destroyed later.
base::ScopedAllowBlockingForTesting allow_blocking; base::ScopedAllowBlockingForTesting allow_blocking;
#if defined(OS_CHROMEOS)
chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true);
#endif // defined(OS_CHROMEOS)
ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* temp_profile = Profile::CreateProfile( Profile* temp_profile = Profile::CreateProfile(
profile_manager->user_data_dir().AppendASCII("profile"), nullptr, profile_manager->user_data_dir().AppendASCII("profile"), nullptr,
......
...@@ -137,9 +137,6 @@ ...@@ -137,9 +137,6 @@
-HostedAppNonClientFrameViewAshTest.FocusableViews/material_refresh -HostedAppNonClientFrameViewAshTest.FocusableViews/material_refresh
-HostedAppNonClientFrameViewAshTest.FocusableViews/material_refresh_touch_optimized -HostedAppNonClientFrameViewAshTest.FocusableViews/material_refresh_touch_optimized
# Failed with error: `profile_impl.cc(469)] Check failed: user`.
-ExtensionWebRequestApiTest.WebRequestApiDoesNotCrashOnErrorAfterProfileDestroyed
# Flaky with error: `Check failed: (sequence_checker_).CalledOnValidSequence()`. # Flaky with error: `Check failed: (sequence_checker_).CalledOnValidSequence()`.
-DevToolsSanityTest.DisposeEmptyBrowserContext -DevToolsSanityTest.DisposeEmptyBrowserContext
......
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