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

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

Issue 7616019: Reorganize chrome/test, part #9 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/rlz/rlz.h" 9 #include "chrome/browser/rlz/rlz.h"
10 #include "chrome/browser/search_engines/search_terms_data.h" 10 #include "chrome/browser/search_engines/search_terms_data.h"
11 #include "chrome/browser/search_engines/template_url.h" 11 #include "chrome/browser/search_engines/template_url.h"
12 #include "chrome/test/testing_browser_process_test.h" 12 #include "chrome/test/base/testing_browser_process_test.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 // Simple implementation of SearchTermsData. 15 // Simple implementation of SearchTermsData.
16 class TestSearchTermsData : public SearchTermsData { 16 class TestSearchTermsData : public SearchTermsData {
17 public: 17 public:
18 explicit TestSearchTermsData(const char* google_base_url) 18 explicit TestSearchTermsData(const char* google_base_url)
19 : google_base_url_(google_base_url) { 19 : google_base_url_(google_base_url) {
20 } 20 }
21 21
22 virtual std::string GoogleBaseURLValue() const { 22 virtual std::string GoogleBaseURLValue() const {
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 TEST_F(TemplateURLTest, ParseURLNestedParameter) { 570 TEST_F(TemplateURLTest, ParseURLNestedParameter) {
571 TemplateURLRef url_ref("{%s", 0, 0); 571 TemplateURLRef url_ref("{%s", 0, 0);
572 TemplateURLRef::Replacements replacements; 572 TemplateURLRef::Replacements replacements;
573 bool valid = false; 573 bool valid = false;
574 EXPECT_EQ("{", url_ref.ParseURL("{{searchTerms}", &replacements, &valid)); 574 EXPECT_EQ("{", url_ref.ParseURL("{{searchTerms}", &replacements, &valid));
575 ASSERT_EQ(1U, replacements.size()); 575 ASSERT_EQ(1U, replacements.size());
576 EXPECT_EQ(static_cast<size_t>(1), replacements[0].index); 576 EXPECT_EQ(static_cast<size_t>(1), replacements[0].index);
577 EXPECT_EQ(TemplateURLRef::SEARCH_TERMS, replacements[0].type); 577 EXPECT_EQ(TemplateURLRef::SEARCH_TERMS, replacements[0].type);
578 EXPECT_TRUE(valid); 578 EXPECT_TRUE(valid);
579 } 579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698