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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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 | Annotate | Revision Log
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/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "chrome/browser/sync/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.h"
7 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 7 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 } 106 }
107 return tab_count; 107 return tab_count;
108 } 108 }
109 109
110 GURL SessionsSyncPerfTest::NextURL() { 110 GURL SessionsSyncPerfTest::NextURL() {
111 return IntToURL(url_number_++); 111 return IntToURL(url_number_++);
112 } 112 }
113 113
114 GURL SessionsSyncPerfTest::IntToURL(int n) { 114 GURL SessionsSyncPerfTest::IntToURL(int n) {
115 return GURL(StringPrintf("http://localhost/%d", n)); 115 return GURL(base::StringPrintf("http://localhost/%d", n));
116 } 116 }
117 117
118 // TODO(lipalani): Re-enable after crbug.com/96921 is fixed. 118 // TODO(lipalani): Re-enable after crbug.com/96921 is fixed.
119 IN_PROC_BROWSER_TEST_F(SessionsSyncPerfTest, DISABLED_P0) { 119 IN_PROC_BROWSER_TEST_F(SessionsSyncPerfTest, DISABLED_P0) {
120 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 120 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
121 121
122 AddTabs(0, kNumTabs); 122 AddTabs(0, kNumTabs);
123 base::TimeDelta dt = 123 base::TimeDelta dt =
124 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 124 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
125 ASSERT_EQ(kNumTabs, GetTabCount(0)); 125 ASSERT_EQ(kNumTabs, GetTabCount(0));
126 ASSERT_EQ(kNumTabs, GetTabCount(1)); 126 ASSERT_EQ(kNumTabs, GetTabCount(1));
127 SyncTimingHelper::PrintResult("tabs", "add_tabs", dt); 127 SyncTimingHelper::PrintResult("tabs", "add_tabs", dt);
128 128
129 UpdateTabs(0); 129 UpdateTabs(0);
130 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 130 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
131 ASSERT_EQ(kNumTabs, GetTabCount(0)); 131 ASSERT_EQ(kNumTabs, GetTabCount(0));
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