| OLD | NEW |
| 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/test/live_sync/performance/sync_timing_helper.h" | 8 #include "chrome/test/live_sync/performance/sync_timing_helper.h" |
| 9 #include "chrome/test/live_sync/live_sessions_sync_test.h" | 9 #include "chrome/test/live_sync/live_sessions_sync_test.h" |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 IN_PROC_BROWSER_TEST_F(SessionsSyncPerfTest, P0) { | 102 IN_PROC_BROWSER_TEST_F(SessionsSyncPerfTest, P0) { |
| 103 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 103 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 104 | 104 |
| 105 AddTabs(0, kNumTabs); | 105 AddTabs(0, kNumTabs); |
| 106 base::TimeDelta dt = | 106 base::TimeDelta dt = |
| 107 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 107 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 108 ASSERT_EQ(kNumTabs, GetTabCount(0)); | 108 ASSERT_EQ(kNumTabs, GetTabCount(0)); |
| 109 ASSERT_EQ(kNumTabs, GetTabCount(1)); | 109 ASSERT_EQ(kNumTabs, GetTabCount(1)); |
| 110 SyncTimingHelper::PrintResult("tabs", "add", dt); | 110 SyncTimingHelper::PrintResult("tabs", "add_tabs", dt); |
| 111 | 111 |
| 112 UpdateTabs(0); | 112 UpdateTabs(0); |
| 113 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 113 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 114 ASSERT_EQ(kNumTabs, GetTabCount(0)); | 114 ASSERT_EQ(kNumTabs, GetTabCount(0)); |
| 115 ASSERT_EQ(kNumTabs, GetTabCount(1)); | 115 ASSERT_EQ(kNumTabs, GetTabCount(1)); |
| 116 SyncTimingHelper::PrintResult("tabs", "update", dt); | 116 SyncTimingHelper::PrintResult("tabs", "update_tabs", dt); |
| 117 | 117 |
| 118 RemoveTabs(0); | 118 RemoveTabs(0); |
| 119 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 119 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 120 // New tab page remains open on profile 0 after closing all tabs. | 120 // New tab page remains open on profile 0 after closing all tabs. |
| 121 ASSERT_EQ(1, GetTabCount(0)); | 121 ASSERT_EQ(1, GetTabCount(0)); |
| 122 ASSERT_EQ(0, GetTabCount(1)); | 122 ASSERT_EQ(0, GetTabCount(1)); |
| 123 SyncTimingHelper::PrintResult("tabs", "delete", dt); | 123 SyncTimingHelper::PrintResult("tabs", "delete_tabs", dt); |
| 124 } | 124 } |
| OLD | NEW |