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

Side by Side Diff: chrome/browser/rlz/rlz_unittest.cc

Issue 1136553005: Revert of Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 (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 "chrome/browser/rlz/rlz.h" 5 #include "chrome/browser/rlz/rlz.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/autocomplete/autocomplete_controller.h" 10 #include "chrome/browser/autocomplete/autocomplete_controller.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 void RlzLibTest::SimulateHomepageUsage() { 265 void RlzLibTest::SimulateHomepageUsage() {
266 GURL home_url = GURL("https://www.google.com/"); 266 GURL home_url = GURL("https://www.google.com/");
267 GURL search_url = GURL("https://www.google.com/#q=search"); 267 GURL search_url = GURL("https://www.google.com/#q=search");
268 268
269 content::RenderFrameHostTester* rfht = 269 content::RenderFrameHostTester* rfht =
270 content::RenderFrameHostTester::For(main_rfh()); 270 content::RenderFrameHostTester::For(main_rfh());
271 271
272 // Simulate a navigation to homepage first. 272 // Simulate a navigation to homepage first.
273 rfht->SendNavigateWithTransition( 273 rfht->SendNavigateWithTransition(0, home_url, ui::PAGE_TRANSITION_HOME_PAGE);
274 0, 0, true, home_url, ui::PAGE_TRANSITION_HOME_PAGE);
275 // Then simulate a search from homepage. 274 // Then simulate a search from homepage.
276 rfht->SendNavigateWithTransition( 275 rfht->SendNavigateWithTransition(1, search_url, ui::PAGE_TRANSITION_LINK);
277 1, 0, true, search_url, ui::PAGE_TRANSITION_LINK);
278 } 276 }
279 277
280 void RlzLibTest::SimulateAppListUsage() { 278 void RlzLibTest::SimulateAppListUsage() {
281 RLZTracker::RecordAppListSearch(); 279 RLZTracker::RecordAppListSearch();
282 } 280 }
283 281
284 void RlzLibTest::InvokeDelayedInit() { 282 void RlzLibTest::InvokeDelayedInit() {
285 tracker_.DelayedInit(); 283 tracker_.DelayedInit();
286 } 284 }
287 285
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 RLZTracker::RecordProductEvent(rlz_lib::CHROME, RLZTracker::ChromeOmnibox(), 906 RLZTracker::RecordProductEvent(rlz_lib::CHROME, RLZTracker::ChromeOmnibox(),
909 rlz_lib::FIRST_SEARCH); 907 rlz_lib::FIRST_SEARCH);
910 908
911 ExpectEventRecorded(kOmniboxFirstSearch, true); 909 ExpectEventRecorded(kOmniboxFirstSearch, true);
912 910
913 RLZTracker::ClearRlzState(); 911 RLZTracker::ClearRlzState();
914 912
915 ExpectEventRecorded(kOmniboxFirstSearch, false); 913 ExpectEventRecorded(kOmniboxFirstSearch, false);
916 } 914 }
917 #endif // defined(OS_CHROMEOS) 915 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698