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

Side by Side Diff: chrome/browser/app_controller_mac_browsertest.mm

Issue 1113333003: Don't create a new profile when cleaning up stale ephemeral profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fix? Created 5 years, 7 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
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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 #import <Cocoa/Cocoa.h> 6 #import <Cocoa/Cocoa.h>
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #import <Foundation/NSAppleEventDescriptor.h> 8 #import <Foundation/NSAppleEventDescriptor.h>
9 #import <objc/message.h> 9 #import <objc/message.h>
10 #import <objc/runtime.h> 10 #import <objc/runtime.h>
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 HistoryServiceFactory::GetForProfile(profile2, 484 HistoryServiceFactory::GetForProfile(profile2,
485 ServiceAccessType::EXPLICIT_ACCESS)); 485 ServiceAccessType::EXPLICIT_ACCESS));
486 EXPECT_NE( 486 EXPECT_NE(
487 HistoryServiceFactory::GetForProfile(profile1, 487 HistoryServiceFactory::GetForProfile(profile1,
488 ServiceAccessType::EXPLICIT_ACCESS), 488 ServiceAccessType::EXPLICIT_ACCESS),
489 HistoryServiceFactory::GetForProfile(profile2, 489 HistoryServiceFactory::GetForProfile(profile2,
490 ServiceAccessType::EXPLICIT_ACCESS)); 490 ServiceAccessType::EXPLICIT_ACCESS));
491 491
492 // Delete profile2. 492 // Delete profile2.
493 profile_manager->ScheduleProfileForDeletion( 493 profile_manager->ScheduleProfileForDeletion(
494 profile2->GetPath(), ProfileManager::CreateCallback()); 494 profile2->GetPath(), false /* suppress_profile_creation */,
495 ProfileManager::CreateCallback());
495 base::RunLoop().RunUntilIdle(); 496 base::RunLoop().RunUntilIdle();
496 497
497 // Verify the controller's history is back to profile1. 498 // Verify the controller's history is back to profile1.
498 EXPECT_EQ([ac historyMenuBridge]->service(), 499 EXPECT_EQ([ac historyMenuBridge]->service(),
499 HistoryServiceFactory::GetForProfile(profile1, 500 HistoryServiceFactory::GetForProfile(profile1,
500 ServiceAccessType::EXPLICIT_ACCESS)); 501 ServiceAccessType::EXPLICIT_ACCESS));
501 } 502 }
502 503
503 IN_PROC_BROWSER_TEST_F(AppControllerMainMenuBrowserTest, 504 IN_PROC_BROWSER_TEST_F(AppControllerMainMenuBrowserTest,
504 BookmarksMenuIsRestoredAfterProfileSwitch) { 505 BookmarksMenuIsRestoredAfterProfileSwitch) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 ui_test_utils::NavigateToURL(browser3, test_url1); 690 ui_test_utils::NavigateToURL(browser3, test_url1);
690 EXPECT_EQ(g_handoff_url, GURL()); 691 EXPECT_EQ(g_handoff_url, GURL());
691 692
692 // Activate the original browser window. 693 // Activate the original browser window.
693 Browser* browser1 = active_browser_list->get(0); 694 Browser* browser1 = active_browser_list->get(0);
694 browser1->window()->Show(); 695 browser1->window()->Show();
695 EXPECT_EQ(g_handoff_url, test_url2); 696 EXPECT_EQ(g_handoff_url, test_url2);
696 } 697 }
697 698
698 } // namespace 699 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac_unittest.mm » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698