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

Side by Side Diff: chrome/browser/search/instant_service_unittest.cc

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 rph->sink().ClearMessages(); 102 rph->sink().ClearMessages();
103 instant_service_->Observe( 103 instant_service_->Observe(
104 content::NOTIFICATION_RENDERER_PROCESS_CREATED, 104 content::NOTIFICATION_RENDERER_PROCESS_CREATED,
105 content::Source<content::MockRenderProcessHost>(rph.get()), 105 content::Source<content::MockRenderProcessHost>(rph.get()),
106 content::NotificationService::NoDetails()); 106 content::NotificationService::NoDetails());
107 EXPECT_EQ(1U, rph->sink().message_count()); 107 EXPECT_EQ(1U, rph->sink().message_count());
108 const IPC::Message* msg = rph->sink().GetMessageAt(0); 108 const IPC::Message* msg = rph->sink().GetMessageAt(0);
109 ASSERT_TRUE(msg); 109 ASSERT_TRUE(msg);
110 ChromeViewMsg_SetSearchURLs::Param params; 110 ChromeViewMsg_SetSearchURLs::Param params;
111 ChromeViewMsg_SetSearchURLs::Read(msg, &params); 111 ChromeViewMsg_SetSearchURLs::Read(msg, &params);
112 std::vector<GURL> search_urls = get<0>(params); 112 std::vector<GURL> search_urls = base::get<0>(params);
113 GURL new_tab_page_url = get<1>(params); 113 GURL new_tab_page_url = base::get<1>(params);
114 EXPECT_EQ(2U, search_urls.size()); 114 EXPECT_EQ(2U, search_urls.size());
115 EXPECT_EQ("https://www.google.com/alt#quux=", search_urls[0].spec()); 115 EXPECT_EQ("https://www.google.com/alt#quux=", search_urls[0].spec());
116 EXPECT_EQ("https://www.google.com/url?bar=", search_urls[1].spec()); 116 EXPECT_EQ("https://www.google.com/url?bar=", search_urls[1].spec());
117 EXPECT_EQ("https://www.google.com/newtab", new_tab_page_url.spec()); 117 EXPECT_EQ("https://www.google.com/newtab", new_tab_page_url.spec());
118 } 118 }
119 119
120 TEST_F(InstantServiceTest, InstantSearchEnabled) { 120 TEST_F(InstantServiceTest, InstantSearchEnabled) {
121 EXPECT_NE(static_cast<InstantSearchPrerenderer*>(NULL), 121 EXPECT_NE(static_cast<InstantSearchPrerenderer*>(NULL),
122 GetInstantSearchPrerenderer()); 122 GetInstantSearchPrerenderer());
123 } 123 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 NotifyGoogleBaseURLUpdate(new_base_url); 158 NotifyGoogleBaseURLUpdate(new_base_url);
159 EXPECT_NE(old_prerenderer, GetInstantSearchPrerenderer()); 159 EXPECT_NE(old_prerenderer, GetInstantSearchPrerenderer());
160 } 160 }
161 161
162 TEST_F(InstantServiceTest, OmniboxStartMarginChanged) { 162 TEST_F(InstantServiceTest, OmniboxStartMarginChanged) {
163 int new_start_margin = 92; 163 int new_start_margin = 92;
164 EXPECT_CALL(*instant_service_observer_.get(), 164 EXPECT_CALL(*instant_service_observer_.get(),
165 OmniboxStartMarginChanged(new_start_margin)).Times(1); 165 OmniboxStartMarginChanged(new_start_margin)).Times(1);
166 UpdateOmniboxStartMargin(new_start_margin); 166 UpdateOmniboxStartMargin(new_start_margin);
167 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698