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 "base/callback_helpers.h" | 5 #include "base/callback_helpers.h" |
6 #include "base/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 11 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
14 #include "components/search_engines/template_url.h" | 14 #include "components/search_engines/template_url.h" |
15 #include "components/search_engines/template_url_fetcher.h" | 15 #include "components/search_engines/template_url_fetcher.h" |
16 #include "components/search_engines/template_url_service.h" | 16 #include "components/search_engines/template_url_service.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 StartDownload(keyword, osdd_file_name, | 296 StartDownload(keyword, osdd_file_name, |
297 TemplateURLFetcher::EXPLICIT_PROVIDER, true); | 297 TemplateURLFetcher::EXPLICIT_PROVIDER, true); |
298 ASSERT_EQ(0, add_provider_called_); | 298 ASSERT_EQ(0, add_provider_called_); |
299 ASSERT_EQ(1, callbacks_destroyed_); | 299 ASSERT_EQ(1, callbacks_destroyed_); |
300 | 300 |
301 WaitForDownloadToFinish(); | 301 WaitForDownloadToFinish(); |
302 ASSERT_EQ(1, add_provider_called_); | 302 ASSERT_EQ(1, add_provider_called_); |
303 ASSERT_EQ(2, callbacks_destroyed_); | 303 ASSERT_EQ(2, callbacks_destroyed_); |
304 ASSERT_TRUE(last_callback_template_url_.get()); | 304 ASSERT_TRUE(last_callback_template_url_.get()); |
305 } | 305 } |
OLD | NEW |