| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/keyboard_codes.h" | 5 #include "base/keyboard_codes.h" |
| 6 #include "chrome/browser/automation/ui_controls.h" | 6 #include "chrome/browser/automation/ui_controls.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // There was once a regression where we crashed when launching the bookmark | 74 // There was once a regression where we crashed when launching the bookmark |
| 75 // manager, and another regression where we crashed when calling | 75 // manager, and another regression where we crashed when calling |
| 76 // RecursiveFind(). This test aims to check for these simple crashes. | 76 // RecursiveFind(). This test aims to check for these simple crashes. |
| 77 IN_PROC_BROWSER_TEST_F(BookmarkManagerTest, Crash) { | 77 IN_PROC_BROWSER_TEST_F(BookmarkManagerTest, Crash) { |
| 78 Init(); | 78 Init(); |
| 79 | 79 |
| 80 // Make sure RecursiveFind() is run. | 80 // Make sure RecursiveFind() is run. |
| 81 manager_->SelectInTree(model_->GetBookmarkBarNode(), true); | 81 manager_->SelectInTree(model_->GetBookmarkBarNode(), true); |
| 82 | 82 |
| 83 CleanUp(); | 83 CleanUp(); |
| 84 #if defined(TOOLKIT_VIEWS) | |
| 85 // The test fails on toolkit_views build without the following | |
| 86 // cleanup code. This is because the bookmark bar view refuses to | |
| 87 // be destroyed by a bookmark model when the BrowserProcessImpl | |
| 88 // destroys the bookmark bar model. | |
| 89 // TODO(oshima): http://crbug/28046. | |
| 90 browser()->window()->Close(); | |
| 91 MessageLoopForUI::current()->RunAllPending(); | |
| 92 #endif | |
| 93 } | 84 } |
| OLD | NEW |