OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/test/histogram_tester.h" | 6 #include "base/test/histogram_tester.h" |
7 #include "chrome/browser/sessions/session_service.h" | 7 #include "chrome/browser/sessions/session_service.h" |
8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.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_integration_test_util.h" | 10 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
11 #include "chrome/browser/sync/test/integration/sync_test.h" | 11 #include "chrome/browser/sync/test/integration/sync_test.h" |
12 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" | 12 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "components/browser_sync/browser/profile_sync_service.h" | 14 #include "components/browser_sync/browser/profile_sync_service.h" |
15 #include "components/history/core/browser/history_types.h" | 15 #include "components/history/core/browser/history_types.h" |
16 #include "components/sessions/core/session_types.h" | 16 #include "components/sessions/core/session_types.h" |
17 #include "sync/test/fake_server/fake_server_verifier.h" | 17 #include "components/sync/base/time.h" |
18 #include "sync/test/fake_server/sessions_hierarchy.h" | 18 #include "components/sync/test/fake_server/fake_server_verifier.h" |
19 #include "sync/util/time.h" | 19 #include "components/sync/test/fake_server/sessions_hierarchy.h" |
20 | 20 |
21 using fake_server::SessionsHierarchy; | 21 using fake_server::SessionsHierarchy; |
22 using sessions_helper::CheckInitialState; | 22 using sessions_helper::CheckInitialState; |
23 using sessions_helper::GetLocalWindows; | 23 using sessions_helper::GetLocalWindows; |
24 using sessions_helper::GetSessionData; | 24 using sessions_helper::GetSessionData; |
25 using sessions_helper::ModelAssociatorHasTabWithUrl; | 25 using sessions_helper::ModelAssociatorHasTabWithUrl; |
26 using sessions_helper::OpenTabAndGetLocalWindows; | 26 using sessions_helper::OpenTabAndGetLocalWindows; |
27 using sessions_helper::ScopedWindowMap; | 27 using sessions_helper::ScopedWindowMap; |
28 using sessions_helper::SessionWindowMap; | 28 using sessions_helper::SessionWindowMap; |
29 using sessions_helper::SyncedSessionVector; | 29 using sessions_helper::SyncedSessionVector; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Verify the cookie jar mismatch bool is set to false. | 198 // Verify the cookie jar mismatch bool is set to false. |
199 ASSERT_TRUE(GetFakeServer()->GetLastCommitMessage(&message)); | 199 ASSERT_TRUE(GetFakeServer()->GetLastCommitMessage(&message)); |
200 ASSERT_FALSE(message.commit().config_params().cookie_jar_mismatch()); | 200 ASSERT_FALSE(message.commit().config_params().cookie_jar_mismatch()); |
201 | 201 |
202 // Verify the histograms were recorded properly. | 202 // Verify the histograms were recorded properly. |
203 histogram_tester.ExpectTotalCount("Sync.CookieJarMatchOnNavigation", 2); | 203 histogram_tester.ExpectTotalCount("Sync.CookieJarMatchOnNavigation", 2); |
204 histogram_tester.ExpectBucketCount("Sync.CookieJarMatchOnNavigation", true, | 204 histogram_tester.ExpectBucketCount("Sync.CookieJarMatchOnNavigation", true, |
205 1); | 205 1); |
206 histogram_tester.ExpectUniqueSample("Sync.CookieJarEmptyOnMismatch", true, 1); | 206 histogram_tester.ExpectUniqueSample("Sync.CookieJarEmptyOnMismatch", true, 1); |
207 } | 207 } |
OLD | NEW |