Commit f897a581 authored by Ilia Samsonov's avatar Ilia Samsonov Committed by Commit Bot

Clean test reference to deleted object.

This can cause following tests in the same batch to crash.

Bug: 1006412
Change-Id: I6ac3dce5dadc50aee74f5dcfcbef30730dbb422c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817155Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: Ilia Samsonov <isamsonov@google.com>
Cr-Commit-Position: refs/heads/master@{#701847}
parent 3d9c4494
...@@ -30,6 +30,7 @@ TEST(ChromeBrowserPolicyConnectorTest, HasMachineLevelPolicies) { ...@@ -30,6 +30,7 @@ TEST(ChromeBrowserPolicyConnectorTest, HasMachineLevelPolicies) {
nullptr); nullptr);
provider.UpdateChromePolicy(map); provider.UpdateChromePolicy(map);
EXPECT_TRUE(connector.HasMachineLevelPolicies()); EXPECT_TRUE(connector.HasMachineLevelPolicies());
BrowserPolicyConnectorBase::SetPolicyProviderForTesting(nullptr);
} }
#endif // !defined(OS_CHROMEOS) #endif // !defined(OS_CHROMEOS)
......
...@@ -112,7 +112,6 @@ void BrowserPolicyConnectorBase::SetPolicyProviderForTesting( ...@@ -112,7 +112,6 @@ void BrowserPolicyConnectorBase::SetPolicyProviderForTesting(
// If this function is used by a test then it must be called before the // If this function is used by a test then it must be called before the
// browser is created, and GetPolicyService() gets called. // browser is created, and GetPolicyService() gets called.
CHECK(!g_created_policy_service); CHECK(!g_created_policy_service);
DCHECK(!g_testing_provider);
g_testing_provider = provider; g_testing_provider = provider;
} }
......
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