diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 10:12:25 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 10:12:25 +0000 |
commit | 72a0f06d9a3c375c6328d6cccf2b0c7685043c7d (patch) | |
tree | 4ef6edd29bf6f083741efdf0c5c2e2924b5f3c93 /chrome | |
parent | 0b33827e43af373fc43be34f2e8fbde4028d52f6 (diff) | |
download | chromium_src-72a0f06d9a3c375c6328d6cccf2b0c7685043c7d.zip chromium_src-72a0f06d9a3c375c6328d6cccf2b0c7685043c7d.tar.gz chromium_src-72a0f06d9a3c375c6328d6cccf2b0c7685043c7d.tar.bz2 |
Fix autocomplete_unittest two-phase lookup problems.
The operator<< for AutocompleteResult::const_iterator needs to be declared
in the same namespace as its parameter type, in this case the global namespace.
Otherwise Clang fails to compile this because it is more strict on the Standard.
See http://clang.llvm.org/compatibility.html#dep_lookup for more info.
BUG=none
TEST=unit_tests
Review URL: http://codereview.chromium.org/3591001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc index 18abfb5..fd0ebda 100644 --- a/chrome/browser/autocomplete/autocomplete_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_unittest.cc @@ -17,6 +17,11 @@ #define HISTORY_IDENTIFIER L"Chrome:History" #define SEARCH_IDENTIFIER L"google.com/websearch/en" +static std::ostream& operator<<(std::ostream& os, + const AutocompleteResult::const_iterator& it) { + return os << static_cast<const AutocompleteMatch*>(&(*it)); +} + namespace { const size_t num_results_per_provider = 3; @@ -168,11 +173,6 @@ void AutocompleteProviderTest::Observe(NotificationType type, } } -std::ostream& operator<<(std::ostream& os, - const AutocompleteResult::const_iterator& iter) { - return os << static_cast<const AutocompleteMatch*>(&(*iter)); -} - // Tests that the default selection is set properly when updating results. TEST_F(AutocompleteProviderTest, Query) { RunTest(); |