Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5026)

Unified Diff: chrome/browser/profiles/profile_browsertest.cc

Issue 2769083005: Reporting: Set up in ProfileImplIOData. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_browsertest.cc
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
index 20b97e601d15b19432433c41c727e2667446fc08..d4915f6a4a6c90a180ba05a09b33982916f7e93c 100644
--- a/chrome/browser/profiles/profile_browsertest.cc
+++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -19,6 +19,7 @@
#include "base/sequenced_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/task_scheduler/task_scheduler.h"
+#include "base/test/scoped_feature_list.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "base/version.h"
@@ -48,6 +49,7 @@
#include "extensions/common/value_builder.h"
#include "net/base/net_errors.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/reporting/reporting_feature.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
@@ -550,11 +552,15 @@ void CompareURLRequestContexts(
main_context_getter->GetURLRequestContext();
// Check that the URLRequestContexts are different and that their
- // ChannelIDServices and CookieStores are different.
+ // ChannelIDServices, CookieStores, and ReportingServices are different.
EXPECT_NE(extension_context, main_context);
EXPECT_NE(extension_context->channel_id_service(),
main_context->channel_id_service());
EXPECT_NE(extension_context->cookie_store(), main_context->cookie_store());
+ if (extension_context->reporting_service()) {
+ EXPECT_NE(extension_context->reporting_service(),
+ main_context->reporting_service());
+ }
// Check that the ChannelIDService in the HttpNetworkSession is the same as
// the one directly on the URLRequestContext.
@@ -577,6 +583,9 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, URLRequestContextIsolation) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ base::test::ScopedFeatureList feature_list;
+ feature_list.InitAndEnableFeature(features::kReporting);
+
MockProfileDelegate delegate;
EXPECT_CALL(delegate, OnProfileCreated(testing::NotNull(), true, true));
@@ -613,6 +622,9 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ base::test::ScopedFeatureList feature_list;
+ feature_list.InitAndEnableFeature(features::kReporting);
+
MockProfileDelegate delegate;
EXPECT_CALL(delegate, OnProfileCreated(testing::NotNull(), true, true));
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698