Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: chrome/browser/search_engines/template_url_parser_unittest.cc

Issue 7465041: GTTF: Use a fresh TestingBrowserProcess for each test, part #4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/search_engines/template_url.h" 9 #include "chrome/browser/search_engines/template_url.h"
10 #include "chrome/browser/search_engines/template_url_parser.h" 10 #include "chrome/browser/search_engines/template_url_parser.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "chrome/test/testing_browser_process_test.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 14
14 class TemplateURLParserTest : public testing::Test { 15 class TemplateURLParserTest : public TestingBrowserProcessTest {
15 public: 16 public:
16 TemplateURLParserTest() : parse_result_(true) { 17 TemplateURLParserTest() : parse_result_(true) {
17 } 18 }
18 19
19 virtual void SetUp() { 20 virtual void SetUp() {
20 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &full_path_)); 21 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &full_path_));
21 full_path_ = full_path_.AppendASCII("osdd"); 22 full_path_ = full_path_.AppendASCII("osdd");
22 if (!file_util::PathExists(full_path_)) { 23 if (!file_util::PathExists(full_path_)) {
23 LOG(ERROR) << 24 LOG(ERROR) <<
24 L"This test can't be run without some non-redistributable data"; 25 L"This test can't be run without some non-redistributable data";
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 EXPECT_TRUE(template_url_.url() != NULL); 231 EXPECT_TRUE(template_url_.url() != NULL);
231 EXPECT_TRUE(template_url_.url()->SupportsReplacement()); 232 EXPECT_TRUE(template_url_.url()->SupportsReplacement());
232 EXPECT_TRUE(template_url_.suggestions_url() == NULL); 233 EXPECT_TRUE(template_url_.suggestions_url() == NULL);
233 EXPECT_EQ("http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8", 234 EXPECT_EQ("http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8",
234 template_url_.url()->url()); 235 template_url_.url()->url());
235 ASSERT_EQ(1U, template_url_.input_encodings().size()); 236 ASSERT_EQ(1U, template_url_.input_encodings().size());
236 EXPECT_EQ("UTF-8", template_url_.input_encodings()[0]); 237 EXPECT_EQ("UTF-8", template_url_.input_encodings()[0]);
237 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"), 238 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"),
238 template_url_.GetFaviconURL()); 239 template_url_.GetFaviconURL());
239 } 240 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698