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

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

Issue 1311123003: Fix sync E2E tests due to unclosed avatar windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 3 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
« no previous file with comments | « chrome/browser/sync/test/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/sync/test/integration/sync_test.h" 5 #include "chrome/browser/sync/test/integration/sync_test.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 26 matching lines...) Expand all
37 #include "chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h" 37 #include "chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h"
38 #include "chrome/browser/sync/test/integration/p2p_sync_refresher.h" 38 #include "chrome/browser/sync/test/integration/p2p_sync_refresher.h"
39 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 39 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
40 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h" 40 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h"
41 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 41 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
42 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" 42 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
43 #include "chrome/browser/ui/browser.h" 43 #include "chrome/browser/ui/browser.h"
44 #include "chrome/browser/ui/browser_finder.h" 44 #include "chrome/browser/ui/browser_finder.h"
45 #include "chrome/browser/ui/host_desktop.h" 45 #include "chrome/browser/ui/host_desktop.h"
46 #include "chrome/browser/ui/tabs/tab_strip_model.h" 46 #include "chrome/browser/ui/tabs/tab_strip_model.h"
47 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
msw 2015/09/01 00:27:20 Shouldn't this only be included #if defined(TOOLKI
msw 2015/09/15 18:17:23 You never addressed this comment. I'd expect that
47 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 48 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
48 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 49 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
49 #include "chrome/common/chrome_constants.h" 50 #include "chrome/common/chrome_constants.h"
50 #include "chrome/common/chrome_paths.h" 51 #include "chrome/common/chrome_paths.h"
51 #include "chrome/common/chrome_switches.h" 52 #include "chrome/common/chrome_switches.h"
52 #include "chrome/test/base/testing_browser_process.h" 53 #include "chrome/test/base/testing_browser_process.h"
53 #include "chrome/test/base/ui_test_utils.h" 54 #include "chrome/test/base/ui_test_utils.h"
54 #include "components/bookmarks/test/bookmark_test_helpers.h" 55 #include "components/bookmarks/test/bookmark_test_helpers.h"
55 #include "components/google/core/browser/google_url_tracker.h" 56 #include "components/google/core/browser/google_url_tracker.h"
56 #include "components/invalidation/impl/invalidation_switches.h" 57 #include "components/invalidation/impl/invalidation_switches.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 570
570 // OneClickSigninSyncStarter observer is created with a real user sign in. 571 // OneClickSigninSyncStarter observer is created with a real user sign in.
571 // It is deleted on certain conditions which are not satisfied by our tests, 572 // It is deleted on certain conditions which are not satisfied by our tests,
572 // and this causes the SigninTracker observer to stay hanging at shutdown. 573 // and this causes the SigninTracker observer to stay hanging at shutdown.
573 // Calling LoginUIService::SyncConfirmationUIClosed forces the observer to 574 // Calling LoginUIService::SyncConfirmationUIClosed forces the observer to
574 // be removed. http://crbug.com/484388 575 // be removed. http://crbug.com/484388
575 for (int i = 0; i < num_clients_; ++i) { 576 for (int i = 0; i < num_clients_; ++i) {
576 LoginUIServiceFactory::GetForProfile(GetProfile(i))-> 577 LoginUIServiceFactory::GetForProfile(GetProfile(i))->
577 SyncConfirmationUIClosed(false /* configure_sync_first */); 578 SyncConfirmationUIClosed(false /* configure_sync_first */);
578 } 579 }
580
581 // Upon multiple profiles sign in, the profile chooser widget stays open and
582 // causes problems at test shutdown. This is a harmless command to close
583 // the widget in case it was showing.
584 // ChromeOS and mobile platforms don't have a ProfileChooserView.
585 #if defined(FRAME_AVATAR_BUTTON)
586 ProfileChooserView::Hide();
msw 2015/09/01 00:27:20 Instead, try something like ui_test_utils::FocusVi
587 #endif // defined(FRAME_AVATAR_BUTTON)
579 } 588 }
580 589
581 return true; 590 return true;
582 } 591 }
583 592
584 void SyncTest::TearDownOnMainThread() { 593 void SyncTest::TearDownOnMainThread() {
585 for (size_t i = 0; i < clients_.size(); ++i) { 594 for (size_t i = 0; i < clients_.size(); ++i) {
586 clients_[i]->service()->RequestStop(ProfileSyncService::CLEAR_DATA); 595 clients_[i]->service()->RequestStop(ProfileSyncService::CLEAR_DATA);
587 } 596 }
588 597
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 content::NotificationService::current()->Notify( 1070 content::NotificationService::current()->Notify(
1062 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, 1071 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
1063 content::Source<Profile>(GetProfile(index)), 1072 content::Source<Profile>(GetProfile(index)),
1064 content::Details<const syncer::ModelTypeSet>(&model_types)); 1073 content::Details<const syncer::ModelTypeSet>(&model_types));
1065 } 1074 }
1066 1075
1067 void SyncTest::SetPreexistingPreferencesFileContents( 1076 void SyncTest::SetPreexistingPreferencesFileContents(
1068 const std::string& contents) { 1077 const std::string& contents) {
1069 preexisting_preferences_file_contents_ = contents; 1078 preexisting_preferences_file_contents_ = contents;
1070 } 1079 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698