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

Side by Side Diff: chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 6 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/test/integration/sessions_helper.h" 8 #include "chrome/browser/sync/test/integration/sessions_helper.h"
9 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 GURL url; 62 GURL url;
63 std::vector<GURL> urls; 63 std::vector<GURL> urls;
64 for (int i = 0; i < browser->tab_strip_model()->count(); ++i) { 64 for (int i = 0; i < browser->tab_strip_model()->count(); ++i) {
65 chrome::SelectNumberedTab(browser, i); 65 chrome::SelectNumberedTab(browser, i);
66 url = NextURL(); 66 url = NextURL();
67 browser->OpenURL( 67 browser->OpenURL(
68 OpenURLParams(url, 68 OpenURLParams(url,
69 content::Referrer(GURL("http://localhost"), 69 content::Referrer(GURL("http://localhost"),
70 blink::WebReferrerPolicyDefault), 70 blink::WebReferrerPolicyDefault),
71 CURRENT_TAB, 71 CURRENT_TAB,
72 content::PageTransitionFromInt(0), false)); 72 ui::PAGE_TRANSITION_LINK, false));
73 urls.push_back(url); 73 urls.push_back(url);
74 } 74 }
75 WaitForTabsToLoad(profile, urls); 75 WaitForTabsToLoad(profile, urls);
76 } 76 }
77 77
78 void SessionsSyncPerfTest::RemoveTabs(int profile) { 78 void SessionsSyncPerfTest::RemoveTabs(int profile) {
79 GetBrowser(profile)->tab_strip_model()->CloseAllTabs(); 79 GetBrowser(profile)->tab_strip_model()->CloseAllTabs();
80 } 80 }
81 81
82 int SessionsSyncPerfTest::GetTabCount(int profile) { 82 int SessionsSyncPerfTest::GetTabCount(int profile) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ASSERT_EQ(kNumTabs, GetTabCount(1)); 132 ASSERT_EQ(kNumTabs, GetTabCount(1));
133 SyncTimingHelper::PrintResult("tabs", "update_tabs", dt); 133 SyncTimingHelper::PrintResult("tabs", "update_tabs", dt);
134 134
135 RemoveTabs(0); 135 RemoveTabs(0);
136 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 136 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
137 // New tab page remains open on profile 0 after closing all tabs. 137 // New tab page remains open on profile 0 after closing all tabs.
138 ASSERT_EQ(1, GetTabCount(0)); 138 ASSERT_EQ(1, GetTabCount(0));
139 ASSERT_EQ(0, GetTabCount(1)); 139 ASSERT_EQ(0, GetTabCount(1));
140 SyncTimingHelper::PrintResult("tabs", "delete_tabs", dt); 140 SyncTimingHelper::PrintResult("tabs", "delete_tabs", dt);
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698