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

Unified Diff: content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc

Issue 2973233002: [Background Fetch] Cleanup/fix thread safety (Closed)
Patch Set: Remove n.b. from comments Created 3 years, 5 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
Index: content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc
diff --git a/content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc b/content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc
index 0d6eb0cb1df26f102beee55acc0edeb1fc56be52..b930f6b05bfd799b0674ad30ee357e945e7beb1b 100644
--- a/content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc
+++ b/content/browser/background_fetch/background_fetch_cross_origin_filter_unittest.cc
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "content/browser/background_fetch/background_fetch_request_info.h"
#include "content/common/service_worker/service_worker_types.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -20,7 +21,8 @@ const char kAccessControlAllowOriginHeader[] = "access-control-allow-origin";
class BackgroundFetchCrossOriginFilterTest : public ::testing::Test {
public:
BackgroundFetchCrossOriginFilterTest()
- : source_(url::Origin(GURL(kFirstOrigin))) {}
+ : thread_bundle_(TestBrowserThreadBundle::REAL_IO_THREAD),
+ source_(url::Origin(GURL(kFirstOrigin))) {}
~BackgroundFetchCrossOriginFilterTest() override = default;
// Creates a BackgroundFetchRequestInfo instance filled with the information
@@ -45,6 +47,8 @@ class BackgroundFetchCrossOriginFilterTest : public ::testing::Test {
}
protected:
+ TestBrowserThreadBundle thread_bundle_; // Must be first member.
+
url::Origin source_;
private:

Powered by Google App Engine
This is Rietveld 408576698