OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 12 #include "chrome/browser/search_engines/template_url_service_factory.h" |
14 #include "chrome/browser/search_engines/template_url_service_factory_test_util.h
" | 13 #include "chrome/browser/search_engines/template_url_service_factory_test_util.h
" |
15 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 15 #include "components/prefs/pref_service.h" |
16 #include "components/search_engines/desktop_search_win.h" | 16 #include "components/search_engines/desktop_search_win.h" |
17 #include "components/search_engines/util.h" | 17 #include "components/search_engines/util.h" |
18 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 class StartupBrowserCreatorWinTest : public testing::Test { | 22 class StartupBrowserCreatorWinTest : public testing::Test { |
23 public: | 23 public: |
24 StartupBrowserCreatorWinTest() {} | 24 StartupBrowserCreatorWinTest() {} |
25 | 25 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 command_line, base::FilePath(), &profile)); | 81 command_line, base::FilePath(), &profile)); |
82 | 82 |
83 // Preference set to enabled, feature disabled. | 83 // Preference set to enabled, feature disabled. |
84 profile.GetPrefs()->SetBoolean(prefs::kWindowsDesktopSearchRedirectionPref, | 84 profile.GetPrefs()->SetBoolean(prefs::kWindowsDesktopSearchRedirectionPref, |
85 true); | 85 true); |
86 SetWindowsDesktopSearchFeatureEnabled(false); | 86 SetWindowsDesktopSearchFeatureEnabled(false); |
87 EXPECT_EQ(desktop_search_url_vector, | 87 EXPECT_EQ(desktop_search_url_vector, |
88 StartupBrowserCreator::GetURLsFromCommandLine( | 88 StartupBrowserCreator::GetURLsFromCommandLine( |
89 command_line, base::FilePath(), &profile)); | 89 command_line, base::FilePath(), &profile)); |
90 } | 90 } |
OLD | NEW |