OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/logging.h" | |
7 #include "base/path_service.h" | 6 #include "base/path_service.h" |
8 #include "base/string_util.h" | 7 #include "base/string_util.h" |
9 #include "chrome/browser/search_engines/template_url.h" | 8 #include "chrome/browser/search_engines/template_url.h" |
10 #include "chrome/browser/search_engines/template_url_model.h" | 9 #include "chrome/browser/search_engines/template_url_model.h" |
11 #include "chrome/common/pref_service.h" | 10 #include "chrome/common/pref_service.h" |
12 #include "chrome/test/testing_profile.h" | 11 #include "chrome/test/testing_profile.h" |
13 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 using base::Time; | 15 using base::Time; |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 VerifyObserverCount(1); | 623 VerifyObserverCount(1); |
625 | 624 |
626 // Make sure the host->TemplateURL map was updated appropriately. | 625 // Make sure the host->TemplateURL map was updated appropriately. |
627 ASSERT_EQ(t_url, model_->GetTemplateURLForHost("foo.com")); | 626 ASSERT_EQ(t_url, model_->GetTemplateURLForHost("foo.com")); |
628 EXPECT_TRUE(model_->GetTemplateURLForHost("google.com") == NULL); | 627 EXPECT_TRUE(model_->GetTemplateURLForHost("google.com") == NULL); |
629 EXPECT_EQ("foo.com", t_url->url()->GetHost()); | 628 EXPECT_EQ("foo.com", t_url->url()->GetHost()); |
630 EXPECT_EQ(L"foo.com", t_url->keyword()); | 629 EXPECT_EQ(L"foo.com", t_url->keyword()); |
631 EXPECT_EQ("http://foo.com/?q=x", t_url->url()->ReplaceSearchTerms(*t_url, | 630 EXPECT_EQ("http://foo.com/?q=x", t_url->url()->ReplaceSearchTerms(*t_url, |
632 L"x", TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()).spec()); | 631 L"x", TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()).spec()); |
633 } | 632 } |
OLD | NEW |