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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 std::string expected_url("http://google.com/?"); | 799 std::string expected_url("http://google.com/?"); |
800 expected_url += std::string(chrome::kSafeSearchSafeParameter) + "&" + | 800 expected_url += std::string(chrome::kSafeSearchSafeParameter) + "&" + |
801 chrome::kSafeSearchSsuiParameter; | 801 chrome::kSafeSearchSsuiParameter; |
802 GURL expected_with_parameters(expected_url); | 802 GURL expected_with_parameters(expected_url); |
803 EXPECT_EQ(expected_with_parameters, web_contents->GetURL()); | 803 EXPECT_EQ(expected_with_parameters, web_contents->GetURL()); |
804 } | 804 } |
805 | 805 |
806 IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) { | 806 IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) { |
807 MakeRequestFail make_request_fail("search.example"); | 807 MakeRequestFail make_request_fail("search.example"); |
808 | 808 |
809 chrome::search::EnableQueryExtractionForTesting(); | 809 chrome::search::EnableInstantExtendedAPIForTesting(); |
810 | 810 |
811 // Verifies that a default search is made using the provider configured via | 811 // Verifies that a default search is made using the provider configured via |
812 // policy. Also checks that default search can be completely disabled. | 812 // policy. Also checks that default search can be completely disabled. |
813 const string16 kKeyword(ASCIIToUTF16("testsearch")); | 813 const string16 kKeyword(ASCIIToUTF16("testsearch")); |
814 const std::string kSearchURL("https://www.google.com/search?q={searchTerms}"); | 814 const std::string kSearchURL("https://www.google.com/search?q={searchTerms}"); |
815 const std::string kInstantURL("http://does/not/exist"); | 815 const std::string kInstantURL("http://does/not/exist"); |
816 const std::string kAlternateURL0( | 816 const std::string kAlternateURL0( |
817 "https://www.google.com/search#q={searchTerms}"); | 817 "https://www.google.com/search#q={searchTerms}"); |
818 const std::string kAlternateURL1("https://www.google.com/#q={searchTerms}"); | 818 const std::string kAlternateURL1("https://www.google.com/#q={searchTerms}"); |
819 const std::string kSearchTermsReplacementKey( | 819 const std::string kSearchTermsReplacementKey( |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 this)); | 1944 this)); |
1945 | 1945 |
1946 MessageLoop::current()->Run(); | 1946 MessageLoop::current()->Run(); |
1947 } | 1947 } |
1948 | 1948 |
1949 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 1949 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
1950 MediaStreamDevicesControllerBrowserTest, | 1950 MediaStreamDevicesControllerBrowserTest, |
1951 testing::Bool()); | 1951 testing::Bool()); |
1952 | 1952 |
1953 } // namespace policy | 1953 } // namespace policy |
OLD | NEW |