| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/autocomplete/autocomplete_match.h" | 8 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 9 #include "chrome/browser/autocomplete/extension_app_provider.h" | 9 #include "chrome/browser/autocomplete/extension_app_provider.h" |
| 10 #include "chrome/browser/common/url_database/url_database.h" |
| 10 #include "chrome/browser/history/history.h" | 11 #include "chrome/browser/history/history.h" |
| 11 #include "chrome/browser/history/history_service_factory.h" | 12 #include "chrome/browser/history/history_service_factory.h" |
| 12 #include "chrome/browser/history/url_database.h" | |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 class ExtensionAppProviderTest : public testing::Test { | 17 class ExtensionAppProviderTest : public testing::Test { |
| 18 protected: | 18 protected: |
| 19 struct test_data { | 19 struct test_data { |
| 20 const string16 input; | 20 const string16 input; |
| 21 const size_t num_results; | 21 const size_t num_results; |
| 22 const GURL output[3]; | 22 const GURL output[3]; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 ExtensionAppProvider::ExtensionApp extension_app = | 142 ExtensionAppProvider::ExtensionApp extension_app = |
| 143 {ASCIIToUTF16(cases[i].name), url, true}; | 143 {ASCIIToUTF16(cases[i].name), url, true}; |
| 144 AutocompleteMatch match = | 144 AutocompleteMatch match = |
| 145 app_provider_->CreateAutocompleteMatch(input, | 145 app_provider_->CreateAutocompleteMatch(input, |
| 146 extension_app, | 146 extension_app, |
| 147 0, | 147 0, |
| 148 string16::npos); | 148 string16::npos); |
| 149 EXPECT_EQ(ASCIIToUTF16(cases[i].match_contents), match.contents); | 149 EXPECT_EQ(ASCIIToUTF16(cases[i].match_contents), match.contents); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | |
| OLD | NEW |