OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
7 #include "chrome/browser/search/instant_service.h" | 7 #include "chrome/browser/search/instant_service.h" |
8 #include "chrome/browser/search/instant_service_factory.h" | 8 #include "chrome/browser/search/instant_service_factory.h" |
9 #include "chrome/browser/search/search.h" | 9 #include "chrome/browser/search/search.h" |
10 #include "chrome/browser/task_manager/task_manager.h" | 10 #include "chrome/browser/task_manager/task_manager.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 ~InstantExtendedManualTest() override { | 53 ~InstantExtendedManualTest() override { |
54 scoped_host_resolver_proc_.reset(); | 54 scoped_host_resolver_proc_.reset(); |
55 host_resolver_proc_ = NULL; | 55 host_resolver_proc_ = NULL; |
56 } | 56 } |
57 | 57 |
58 void SetUpOnMainThread() override { | 58 void SetUpOnMainThread() override { |
59 const testing::TestInfo* const test_info = | 59 const testing::TestInfo* const test_info = |
60 testing::UnitTest::GetInstance()->current_test_info(); | 60 testing::UnitTest::GetInstance()->current_test_info(); |
61 ASSERT_TRUE(base::StartsWithASCII(test_info->name(), "MANUAL_", true) || | 61 ASSERT_TRUE(base::StartsWith(test_info->name(), "MANUAL_", |
62 base::StartsWithASCII(test_info->name(), "DISABLED_", true)); | 62 base::CompareCase::SENSITIVE) || |
| 63 base::StartsWith(test_info->name(), "DISABLED_", |
| 64 base::CompareCase::SENSITIVE)); |
63 // Make IsOffline() return false so we don't try to use the local NTP. | 65 // Make IsOffline() return false so we don't try to use the local NTP. |
64 disable_network_change_notifier_.reset( | 66 disable_network_change_notifier_.reset( |
65 new net::NetworkChangeNotifier::DisableForTest()); | 67 new net::NetworkChangeNotifier::DisableForTest()); |
66 } | 68 } |
67 | 69 |
68 void TearDownOnMainThread() override { | 70 void TearDownOnMainThread() override { |
69 disable_network_change_notifier_.reset(); | 71 disable_network_change_notifier_.reset(); |
70 } | 72 } |
71 | 73 |
72 protected: | 74 protected: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 EXPECT_EQ("test", GetOmniboxText()); | 140 EXPECT_EQ("test", GetOmniboxText()); |
139 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); | 141 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); |
140 | 142 |
141 // Pressing enter should search for [test]. | 143 // Pressing enter should search for [test]. |
142 const base::string16& search_title = | 144 const base::string16& search_title = |
143 base::ASCIIToUTF16("test - Google Search"); | 145 base::ASCIIToUTF16("test - Google Search"); |
144 content::TitleWatcher title_watcher(active_tab, search_title); | 146 content::TitleWatcher title_watcher(active_tab, search_title); |
145 PressEnterAndWaitForNavigation(); | 147 PressEnterAndWaitForNavigation(); |
146 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); | 148 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); |
147 } | 149 } |
OLD | NEW |