OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/strings/string_util.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/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 "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 #if defined(ENABLE_RLZ) | 14 #if defined(ENABLE_RLZ) |
15 #include "chrome/browser/google/google_util.h" | 15 #include "chrome/browser/google/google_util.h" |
16 #endif | 16 #endif |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 EXPECT_FALSE(url.ReplaceSearchTermsInURL( | 1025 EXPECT_FALSE(url.ReplaceSearchTermsInURL( |
1026 GURL("http://google.com/alt/?q=#q="), search_terms, &result)); | 1026 GURL("http://google.com/alt/?q=#q="), search_terms, &result)); |
1027 | 1027 |
1028 EXPECT_FALSE(url.ReplaceSearchTermsInURL( | 1028 EXPECT_FALSE(url.ReplaceSearchTermsInURL( |
1029 GURL("http://google.com/alt/?q=123#q="), search_terms, &result)); | 1029 GURL("http://google.com/alt/?q=123#q="), search_terms, &result)); |
1030 | 1030 |
1031 EXPECT_TRUE(url.ReplaceSearchTermsInURL( | 1031 EXPECT_TRUE(url.ReplaceSearchTermsInURL( |
1032 GURL("http://google.com/alt/?q=#q=123"), search_terms, &result)); | 1032 GURL("http://google.com/alt/?q=#q=123"), search_terms, &result)); |
1033 EXPECT_EQ(GURL("http://google.com/alt/?q=#q=Bob Morane"), result); | 1033 EXPECT_EQ(GURL("http://google.com/alt/?q=#q=Bob Morane"), result); |
1034 } | 1034 } |
OLD | NEW |