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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" | |
11 #include "chrome/browser/search/suggestions/thumbnail_manager.h" | 10 #include "chrome/browser/search/suggestions/thumbnail_manager.h" |
12 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "components/leveldb_proto/proto_database.h" | 13 #include "components/leveldb_proto/proto_database.h" |
15 #include "components/leveldb_proto/testing/fake_db.h" | 14 #include "components/leveldb_proto/testing/fake_db.h" |
| 15 #include "components/suggestions/proto/suggestions.pb.h" |
16 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
17 #include "net/base/load_flags.h" | 17 #include "net/base/load_flags.h" |
18 #include "net/test/spawned_test_server/spawned_test_server.h" | 18 #include "net/test/spawned_test_server/spawned_test_server.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "ui/gfx/image/image_skia.h" | 20 #include "ui/gfx/image/image_skia.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
22 | 22 |
23 namespace suggestions { | 23 namespace suggestions { |
24 | 24 |
25 const char kTestUrl1[] = "http://go.com/"; | 25 const char kTestUrl1[] = "http://go.com/"; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 GURL(kTestUrl1), | 266 GURL(kTestUrl1), |
267 base::Bind(&ThumbnailManagerBrowserTest::OnThumbnailAvailable, | 267 base::Bind(&ThumbnailManagerBrowserTest::OnThumbnailAvailable, |
268 base::Unretained(this), &run_loop)); | 268 base::Unretained(this), &run_loop)); |
269 run_loop.Run(); | 269 run_loop.Run(); |
270 | 270 |
271 EXPECT_EQ(0, num_callback_null_called_); | 271 EXPECT_EQ(0, num_callback_null_called_); |
272 EXPECT_EQ(1, num_callback_valid_called_); | 272 EXPECT_EQ(1, num_callback_valid_called_); |
273 } | 273 } |
274 | 274 |
275 } // namespace suggestions | 275 } // namespace suggestions |
OLD | NEW |