| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |