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

Unified Diff: chrome/browser/search/suggestions/thumbnail_manager_unittest.cc

Issue 445753004: [Suggestions] Rename ThumbnailManager to ImageManagerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browsertest fix Created 6 years, 4 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 | « chrome/browser/search/suggestions/thumbnail_manager_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/suggestions/thumbnail_manager_unittest.cc
diff --git a/chrome/browser/search/suggestions/thumbnail_manager_unittest.cc b/chrome/browser/search/suggestions/thumbnail_manager_unittest.cc
deleted file mode 100644
index dd0543bb771a3bd9f0e7b9b77eb4452587de374a..0000000000000000000000000000000000000000
--- a/chrome/browser/search/suggestions/thumbnail_manager_unittest.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/search/suggestions/thumbnail_manager.h"
-#include "chrome/test/base/testing_profile.h"
-#include "components/leveldb_proto/proto_database.h"
-#include "components/leveldb_proto/testing/fake_db.h"
-#include "components/suggestions/proto/suggestions.pb.h"
-#include "content/public/test/test_browser_thread_bundle.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "url/gurl.h"
-
-namespace {
-
-using leveldb_proto::test::FakeDB;
-using suggestions::ThumbnailData;
-using suggestions::ThumbnailManager;
-
-typedef base::hash_map<std::string, ThumbnailData> EntryMap;
-
-const char kTestUrl[] = "http://go.com/";
-const char kTestThumbnailUrl[] = "http://thumb.com/anchor_download_test.png";
-
-class ThumbnailManagerTest : public testing::Test {
- protected:
- ThumbnailManager* CreateThumbnailManager(Profile* profile) {
- FakeDB<ThumbnailData>* fake_db = new FakeDB<ThumbnailData>(&db_model_);
- return new ThumbnailManager(
- profile->GetRequestContext(),
- scoped_ptr<leveldb_proto::ProtoDatabase<ThumbnailData> >(fake_db),
- FakeDB<ThumbnailData>::DirectoryForTestDB());
- }
-
- content::TestBrowserThreadBundle thread_bundle_;
- EntryMap db_model_;
-};
-
-} // namespace
-
-namespace suggestions {
-
-TEST_F(ThumbnailManagerTest, InitializeTest) {
- SuggestionsProfile suggestions_profile;
- ChromeSuggestion* suggestion = suggestions_profile.add_suggestions();
- suggestion->set_url(kTestUrl);
- suggestion->set_thumbnail(kTestThumbnailUrl);
-
- TestingProfile profile;
- scoped_ptr<ThumbnailManager> thumbnail_manager(
- CreateThumbnailManager(&profile));
- thumbnail_manager->Initialize(suggestions_profile);
-
- GURL output;
- EXPECT_TRUE(thumbnail_manager->GetThumbnailURL(GURL(kTestUrl), &output));
- EXPECT_EQ(GURL(kTestThumbnailUrl), output);
-
- EXPECT_FALSE(
- thumbnail_manager->GetThumbnailURL(GURL("http://b.com"), &output));
-}
-
-} // namespace suggestions
« no previous file with comments | « chrome/browser/search/suggestions/thumbnail_manager_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698