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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_sync_promo_controller_unittest.mm

Issue 961443003: Unload the ScopedGaiaAuthExtension asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bookmarks bubble test Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/cocoa/bookmarks/bookmark_sync_promo_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_sync_promo_controller.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 25 matching lines...) Expand all
36 36
37 base::scoped_nsobject<BookmarkSyncPromoController> syncPromo( 37 base::scoped_nsobject<BookmarkSyncPromoController> syncPromo(
38 [[BookmarkSyncPromoController alloc] initWithBrowser:browser()]); 38 [[BookmarkSyncPromoController alloc] initWithBrowser:browser()]);
39 39
40 // Simulate clicking the "Sign in" link. 40 // Simulate clicking the "Sign in" link.
41 [syncPromo textView:nil clickedOnLink:nil atIndex:0u]; 41 [syncPromo textView:nil clickedOnLink:nil atIndex:0u];
42 42
43 // A new tab should have been opened. 43 // A new tab should have been opened.
44 int tab_count = browser()->tab_strip_model()->count(); 44 int tab_count = browser()->tab_strip_model()->count();
45 EXPECT_EQ(starting_tab_count + 1, tab_count); 45 EXPECT_EQ(starting_tab_count + 1, tab_count);
46
47 // Close the tab, so that the gaia auth extension is unloaded correctly.
48 // Otherwise the test can crash if the profile is deleted before the extension
49 // is unloaded.
50 browser()->tab_strip_model()->CloseAllTabs();
46 } 51 }
47 52
48 } // namespace 53 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698