| Index: chrome/browser/policy/policy_browsertest.cc
|
| diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
|
| index 9b2ee7c1456e4b41d383229d687fc0bcf8c81d02..e7488b510753421e795794c280b7e890caa4c85d 100644
|
| --- a/chrome/browser/policy/policy_browsertest.cc
|
| +++ b/chrome/browser/policy/policy_browsertest.cc
|
| @@ -48,6 +48,7 @@
|
| #include "chrome/browser/interstitials/security_interstitial_page_test_utils.h"
|
| #include "chrome/browser/media/media_capture_devices_dispatcher.h"
|
| #include "chrome/browser/media/media_stream_devices_controller.h"
|
| +#include "chrome/browser/metrics/variations/chrome_variations_service_client.h"
|
| #include "chrome/browser/metrics/variations/variations_service.h"
|
| #include "chrome/browser/net/prediction_options.h"
|
| #include "chrome/browser/net/url_request_mock_util.h"
|
| @@ -104,6 +105,7 @@
|
| #include "components/translate/core/browser/language_state.h"
|
| #include "components/translate/core/browser/translate_infobar_delegate.h"
|
| #include "components/version_info/version_info.h"
|
| +#include "components/web_resource/resource_request_allowed_notifier.h"
|
| #include "content/public/browser/browser_child_process_host_iterator.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -3774,9 +3776,16 @@ IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) {
|
| chrome_variations::VariationsService::
|
| GetDefaultVariationsServerURLForTesting();
|
|
|
| - const GURL url =
|
| - chrome_variations::VariationsService::GetVariationsServerURL(
|
| - g_browser_process->local_state(), std::string());
|
| + // g_browser_process->variations_service() is null by default in Chromium
|
| + // builds, so construct a VariationsService locally instead.
|
| + chrome_variations::VariationsService service(
|
| + make_scoped_ptr(new ChromeVariationsServiceClient()),
|
| + new web_resource::ResourceRequestAllowedNotifier(
|
| + g_browser_process->local_state(), nullptr),
|
| + g_browser_process->local_state(), NULL);
|
| +
|
| + const GURL url = service.GetVariationsServerURL(
|
| + g_browser_process->local_state(), std::string());
|
| EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url,
|
| base::CompareCase::SENSITIVE));
|
| std::string value;
|
|
|