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" | 6 #include "base/logging.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/scoped_ptr.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_parser.h" | 9 #include "chrome/browser/search_engines/template_url_parser.h" |
11 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 | 12 |
14 class TemplateURLParserTest : public testing::Test { | 13 class TemplateURLParserTest : public testing::Test { |
15 public: | 14 public: |
16 TemplateURLParserTest() : parse_result_(true) { | 15 TemplateURLParserTest() : parse_result_(true) { |
17 } | 16 } |
18 | 17 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 EXPECT_TRUE(template_url_.url() != NULL); | 230 EXPECT_TRUE(template_url_.url() != NULL); |
232 EXPECT_TRUE(template_url_.url()->SupportsReplacement()); | 231 EXPECT_TRUE(template_url_.url()->SupportsReplacement()); |
233 EXPECT_TRUE(template_url_.suggestions_url() == NULL); | 232 EXPECT_TRUE(template_url_.suggestions_url() == NULL); |
234 EXPECT_EQ(L"http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8", | 233 EXPECT_EQ(L"http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8", |
235 template_url_.url()->url()); | 234 template_url_.url()->url()); |
236 ASSERT_EQ(1U, template_url_.input_encodings().size()); | 235 ASSERT_EQ(1U, template_url_.input_encodings().size()); |
237 EXPECT_EQ("UTF-8", template_url_.input_encodings()[0]); | 236 EXPECT_EQ("UTF-8", template_url_.input_encodings()[0]); |
238 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"), | 237 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"), |
239 template_url_.GetFavIconURL()); | 238 template_url_.GetFavIconURL()); |
240 } | 239 } |
OLD | NEW |