| 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/session_hierarchy_match_checker.h
" | 9 #include "chrome/browser/sync/test/integration/session_hierarchy_match_checker.h
" |
| 10 #include "chrome/browser/sync/test/integration/sessions_helper.h" | 10 #include "chrome/browser/sync/test/integration/sessions_helper.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 WaitForHierarchyOnServer(SessionsHierarchy( | 316 WaitForHierarchyOnServer(SessionsHierarchy( |
| 317 {{base_url.spec(), moved_tab_url.spec()}, {new_window_url.spec()}})); | 317 {{base_url.spec(), moved_tab_url.spec()}, {new_window_url.spec()}})); |
| 318 | 318 |
| 319 // Move tab 1 in browser 0 to browser 1. | 319 // Move tab 1 in browser 0 to browser 1. |
| 320 MoveTab(0, 1, 1); | 320 MoveTab(0, 1, 1); |
| 321 | 321 |
| 322 WaitForHierarchyOnServer(SessionsHierarchy( | 322 WaitForHierarchyOnServer(SessionsHierarchy( |
| 323 {{base_url.spec()}, {new_window_url.spec(), moved_tab_url.spec()}})); | 323 {{base_url.spec()}, {new_window_url.spec(), moved_tab_url.spec()}})); |
| 324 } | 324 } |
| 325 | 325 |
| 326 IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, CookieJarMismatch) { | 326 // crbug.com/689662 |
| 327 #if defined(OS_CHROMEOS) |
| 328 #define MAYBE_CookieJarMismatch DISABLED_CookieJarMismatch |
| 329 #else |
| 330 #define MAYBE_CookieJarMismatch CookieJarMismatch |
| 331 #endif |
| 332 IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, MAYBE_CookieJarMismatch) { |
| 327 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 333 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 328 | 334 |
| 329 ASSERT_TRUE(CheckInitialState(0)); | 335 ASSERT_TRUE(CheckInitialState(0)); |
| 330 | 336 |
| 331 sync_pb::ClientToServerMessage message; | 337 sync_pb::ClientToServerMessage message; |
| 332 | 338 |
| 333 // The HistogramTester objects are scoped to allow more precise verification. | 339 // The HistogramTester objects are scoped to allow more precise verification. |
| 334 { | 340 { |
| 335 HistogramTester histogram_tester; | 341 HistogramTester histogram_tester; |
| 336 | 342 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 // Verify the cookie jar mismatch bool is set to false. | 381 // Verify the cookie jar mismatch bool is set to false. |
| 376 ASSERT_TRUE(GetFakeServer()->GetLastCommitMessage(&message)); | 382 ASSERT_TRUE(GetFakeServer()->GetLastCommitMessage(&message)); |
| 377 ASSERT_FALSE(message.commit().config_params().cookie_jar_mismatch()); | 383 ASSERT_FALSE(message.commit().config_params().cookie_jar_mismatch()); |
| 378 | 384 |
| 379 // Verify the histograms were recorded properly. | 385 // Verify the histograms were recorded properly. |
| 380 ExpectUniqueSampleGE(histogram_tester, "Sync.CookieJarMatchOnNavigation", | 386 ExpectUniqueSampleGE(histogram_tester, "Sync.CookieJarMatchOnNavigation", |
| 381 true, 1); | 387 true, 1); |
| 382 histogram_tester.ExpectTotalCount("Sync.CookieJarEmptyOnMismatch", 0); | 388 histogram_tester.ExpectTotalCount("Sync.CookieJarEmptyOnMismatch", 0); |
| 383 } | 389 } |
| 384 } | 390 } |
| OLD | NEW |