| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ |
| 7 | 7 |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/autocomplete/autocomplete_result.h" | |
| 12 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 13 #include "chrome/browser/extensions/extension_apitest.h" | 12 #include "chrome/browser/extensions/extension_apitest.h" |
| 14 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
| 16 #include "chrome/browser/ui/location_bar/location_bar.h" | 15 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 17 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 16 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 18 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 17 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 19 #include "components/omnibox/autocomplete_match.h" | 18 #include "components/omnibox/autocomplete_match.h" |
| 19 #include "components/omnibox/autocomplete_result.h" |
| 20 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
| 21 | 21 |
| 22 | 22 |
| 23 class AutocompleteController; | 23 class AutocompleteController; |
| 24 | 24 |
| 25 class OmniboxApiTest : public ExtensionApiTest { | 25 class OmniboxApiTest : public ExtensionApiTest { |
| 26 protected: | 26 protected: |
| 27 LocationBar* GetLocationBar(Browser* browser) const { | 27 LocationBar* GetLocationBar(Browser* browser) const { |
| 28 return browser->window()->GetLocationBar(); | 28 return browser->window()->GetLocationBar(); |
| 29 } | 29 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 output.append( | 52 output.append( |
| 53 base::StringPrintf("[\"%s\" by \"%s\"] ", | 53 base::StringPrintf("[\"%s\" by \"%s\"] ", |
| 54 base::UTF16ToUTF8(match.contents).c_str(), | 54 base::UTF16ToUTF8(match.contents).c_str(), |
| 55 provider_name.c_str())); | 55 provider_name.c_str())); |
| 56 } | 56 } |
| 57 return base::UTF8ToUTF16(output); | 57 return base::UTF8ToUTF16(output); |
| 58 } | 58 } |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ | 61 #endif // CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_TESTBASE_H_ |
| OLD | NEW |