OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
| 7 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
8 #include "base/values.h" | 9 #include "base/values.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h" | 11 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h" |
11 #include "chrome/browser/extensions/extension_function_test_utils.h" | 12 #include "chrome/browser/extensions/extension_function_test_utils.h" |
12 #include "chrome/browser/history/top_sites_factory.h" | 13 #include "chrome/browser/history/top_sites_factory.h" |
13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "components/history/core/browser/top_sites.h" | 17 #include "components/history/core/browser/top_sites.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 get_top_sites_function->set_has_callback(true); | 78 get_top_sites_function->set_has_callback(true); |
78 | 79 |
79 std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( | 80 std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( |
80 get_top_sites_function.get(), "[]", browser())); | 81 get_top_sites_function.get(), "[]", browser())); |
81 base::ListValue* list; | 82 base::ListValue* list; |
82 ASSERT_TRUE(result->GetAsList(&list)); | 83 ASSERT_TRUE(result->GetAsList(&list)); |
83 EXPECT_GE(list->GetSize(), top_sites_prepopulated_pages_size()); | 84 EXPECT_GE(list->GetSize(), top_sites_prepopulated_pages_size()); |
84 } | 85 } |
85 | 86 |
86 } // namespace extensions | 87 } // namespace extensions |
OLD | NEW |