| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" | |
| 9 #include "chrome/browser/search/suggestions/thumbnail_manager.h" | 8 #include "chrome/browser/search/suggestions/thumbnail_manager.h" |
| 10 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 11 #include "components/leveldb_proto/proto_database.h" | 10 #include "components/leveldb_proto/proto_database.h" |
| 12 #include "components/leveldb_proto/testing/fake_db.h" | 11 #include "components/leveldb_proto/testing/fake_db.h" |
| 12 #include "components/suggestions/proto/suggestions.pb.h" |
| 13 #include "content/public/test/test_browser_thread_bundle.h" | 13 #include "content/public/test/test_browser_thread_bundle.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 using leveldb_proto::test::FakeDB; | 19 using leveldb_proto::test::FakeDB; |
| 20 using suggestions::ThumbnailData; | 20 using suggestions::ThumbnailData; |
| 21 using suggestions::ThumbnailManager; | 21 using suggestions::ThumbnailManager; |
| 22 | 22 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 GURL output; | 57 GURL output; |
| 58 EXPECT_TRUE(thumbnail_manager->GetThumbnailURL(GURL(kTestUrl), &output)); | 58 EXPECT_TRUE(thumbnail_manager->GetThumbnailURL(GURL(kTestUrl), &output)); |
| 59 EXPECT_EQ(GURL(kTestThumbnailUrl), output); | 59 EXPECT_EQ(GURL(kTestThumbnailUrl), output); |
| 60 | 60 |
| 61 EXPECT_FALSE( | 61 EXPECT_FALSE( |
| 62 thumbnail_manager->GetThumbnailURL(GURL("http://b.com"), &output)); | 62 thumbnail_manager->GetThumbnailURL(GURL("http://b.com"), &output)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace suggestions | 65 } // namespace suggestions |
| OLD | NEW |