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

Unified Diff: chrome/browser/offline_pages/prefetch/suggested_articles_observer_unittest.cc

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Refactor to remove GCM dependency. Created 3 years, 7 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: chrome/browser/offline_pages/prefetch/suggested_articles_observer_unittest.cc
diff --git a/components/offline_pages/content/suggested_articles_observer_unittest.cc b/chrome/browser/offline_pages/prefetch/suggested_articles_observer_unittest.cc
similarity index 94%
rename from components/offline_pages/content/suggested_articles_observer_unittest.cc
rename to chrome/browser/offline_pages/prefetch/suggested_articles_observer_unittest.cc
index 2a988ddf3673abb16806b75846de6321a0650e82..5351c64adfd61ffcf39212dd3226442232429a02 100644
--- a/components/offline_pages/content/suggested_articles_observer_unittest.cc
+++ b/chrome/browser/offline_pages/prefetch/suggested_articles_observer_unittest.cc
@@ -2,20 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/offline_pages/content/suggested_articles_observer.h"
+#include "chrome/browser/offline_pages/prefetch/suggested_articles_observer.h"
#include "base/run_loop.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "chrome/test/base/testing_profile.h"
#include "components/offline_pages/core/client_namespace_constants.h"
#include "components/offline_pages/core/stub_offline_page_model.h"
-#include "content/public/test/test_browser_context.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
using ntp_snippets::Category;
using ntp_snippets::ContentSuggestion;
+namespace gcm {
+class GCMDriver;
+}
+
namespace offline_pages {
namespace {
@@ -94,7 +99,7 @@ class OfflinePageSuggestedArticlesObserverTest : public testing::Test {
void SetUp() override {
observer_ =
- base::MakeUnique<SuggestedArticlesObserver>(&context_, MakeDelegate());
+ base::MakeUnique<SuggestedArticlesObserver>(&profile_, MakeDelegate());
}
virtual std::unique_ptr<SuggestedArticlesObserver::Delegate> MakeDelegate() {
@@ -113,7 +118,9 @@ class OfflinePageSuggestedArticlesObserverTest : public testing::Test {
protected:
Category category =
Category::FromKnownCategory(ntp_snippets::KnownCategories::ARTICLES);
- content::TestBrowserContext context_;
+
+ content::TestBrowserThreadBundle thread_bundle_;
+ TestingProfile profile_;
private:
std::unique_ptr<SuggestedArticlesObserver> observer_;

Powered by Google App Engine
This is Rietveld 408576698