OLD | NEW |
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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "base/mac/scoped_nsobject.h" | 7 #import "base/mac/scoped_nsobject.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 private: | 291 private: |
292 base::RunLoop run_loop_; | 292 base::RunLoop run_loop_; |
293 | 293 |
294 DISALLOW_COPY_AND_ASSIGN(BrowserRemovedObserver); | 294 DISALLOW_COPY_AND_ASSIGN(BrowserRemovedObserver); |
295 }; | 295 }; |
296 | 296 |
297 // Test that ToolbarController can be destroyed after the Browser. | 297 // Test that ToolbarController can be destroyed after the Browser. |
298 // This can happen because the ToolbarController is retained by both the | 298 // This can happen because the ToolbarController is retained by both the |
299 // BrowserWindowController and -[ToolbarController view], the latter of which is | 299 // BrowserWindowController and -[ToolbarController view], the latter of which is |
300 // autoreleased. | 300 // autoreleased. |
301 // TODO(nhiroki): This is disabled due to http://crbug.com/506745. | 301 TEST_F(ToolbarControllerTest, ToolbarDestroyedAfterBrowser) { |
302 TEST_F(ToolbarControllerTest, DISABLED_ToolbarDestroyedAfterBrowser) { | |
303 BrowserRemovedObserver observer; | 302 BrowserRemovedObserver observer; |
| 303 // This is normally called by BrowserWindowController, but since |bar_| is not |
| 304 // owned by one, call it here. |
| 305 [bar_ browserWillBeDestroyed]; |
304 CloseBrowserWindow(); | 306 CloseBrowserWindow(); |
305 observer.WaitUntilBrowserRemoved(); | 307 observer.WaitUntilBrowserRemoved(); |
306 // |bar_| is released in TearDown(). | 308 // |bar_| is released in TearDown(). |
307 } | 309 } |
308 | 310 |
309 } // namespace | 311 } // namespace |
OLD | NEW |