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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/sync/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 8 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
9 #include "chrome/browser/sync/test/integration/sessions_helper.h" 9 #include "chrome/browser/sync/test/integration/sessions_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 10 #include "chrome/browser/sync/test/integration/sync_test.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void SessionsSyncPerfTest::UpdateTabs(int profile) { 57 void SessionsSyncPerfTest::UpdateTabs(int profile) {
58 Browser* browser = GetBrowser(profile); 58 Browser* browser = GetBrowser(profile);
59 GURL url; 59 GURL url;
60 std::vector<GURL> urls; 60 std::vector<GURL> urls;
61 for (int i = 0; i < browser->tab_count(); ++i) { 61 for (int i = 0; i < browser->tab_count(); ++i) {
62 browser->SelectNumberedTab(i); 62 browser->SelectNumberedTab(i);
63 url = NextURL(); 63 url = NextURL();
64 browser->OpenURL( 64 browser->OpenURL(
65 OpenURLParams(url, GURL("http://localhost"), CURRENT_TAB, 0)); 65 OpenURLParams(url, GURL("http://localhost"), CURRENT_TAB,
66 content::PageTransitionFromInt(0)));
66 urls.push_back(url); 67 urls.push_back(url);
67 } 68 }
68 WaitForTabsToLoad(profile, urls); 69 WaitForTabsToLoad(profile, urls);
69 } 70 }
70 71
71 void SessionsSyncPerfTest::RemoveTabs(int profile) { 72 void SessionsSyncPerfTest::RemoveTabs(int profile) {
72 GetBrowser(profile)->CloseAllTabs(); 73 GetBrowser(profile)->CloseAllTabs();
73 } 74 }
74 75
75 int SessionsSyncPerfTest::GetTabCount(int profile) { 76 int SessionsSyncPerfTest::GetTabCount(int profile) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ASSERT_EQ(kNumTabs, GetTabCount(1)); 126 ASSERT_EQ(kNumTabs, GetTabCount(1));
126 SyncTimingHelper::PrintResult("tabs", "update_tabs", dt); 127 SyncTimingHelper::PrintResult("tabs", "update_tabs", dt);
127 128
128 RemoveTabs(0); 129 RemoveTabs(0);
129 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 130 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
130 // New tab page remains open on profile 0 after closing all tabs. 131 // New tab page remains open on profile 0 after closing all tabs.
131 ASSERT_EQ(1, GetTabCount(0)); 132 ASSERT_EQ(1, GetTabCount(0));
132 ASSERT_EQ(0, GetTabCount(1)); 133 ASSERT_EQ(0, GetTabCount(1));
133 SyncTimingHelper::PrintResult("tabs", "delete_tabs", dt); 134 SyncTimingHelper::PrintResult("tabs", "delete_tabs", dt);
134 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698