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 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 message_loop_.RunUntilIdle(); | 54 message_loop_.RunUntilIdle(); |
55 | 55 |
56 bookmark_bar_.reset(); | 56 bookmark_bar_.reset(); |
57 origin_provider_.reset(); | 57 origin_provider_.reset(); |
58 browser_.reset(); | 58 browser_.reset(); |
59 profile_.reset(); | 59 profile_.reset(); |
60 } | 60 } |
61 | 61 |
62 BookmarkModel* model_; | 62 BookmarkModel* model_; |
63 | 63 |
64 MessageLoopForUI message_loop_; | 64 base::MessageLoopForUI message_loop_; |
65 content::TestBrowserThread ui_thread_; | 65 content::TestBrowserThread ui_thread_; |
66 content::TestBrowserThread file_thread_; | 66 content::TestBrowserThread file_thread_; |
67 | 67 |
68 scoped_ptr<TestingProfile> profile_; | 68 scoped_ptr<TestingProfile> profile_; |
69 scoped_ptr<Browser> browser_; | 69 scoped_ptr<Browser> browser_; |
70 scoped_ptr<TabstripOriginProvider> origin_provider_; | 70 scoped_ptr<TabstripOriginProvider> origin_provider_; |
71 scoped_ptr<BookmarkBarGtk> bookmark_bar_; | 71 scoped_ptr<BookmarkBarGtk> bookmark_bar_; |
72 }; | 72 }; |
73 | 73 |
74 TEST_F(BookmarkBarGtkUnittest, DisplaysHelpMessageOnEmpty) { | 74 TEST_F(BookmarkBarGtkUnittest, DisplaysHelpMessageOnEmpty) { |
(...skipping 21 matching lines...) Expand all Loading... |
96 ASCIIToUTF16("other"), GURL("http://two.com")); | 96 ASCIIToUTF16("other"), GURL("http://two.com")); |
97 | 97 |
98 bookmark_bar_->Loaded(model_, false); | 98 bookmark_bar_->Loaded(model_, false); |
99 | 99 |
100 // We should expect two children to the bookmark bar's toolbar. | 100 // We should expect two children to the bookmark bar's toolbar. |
101 GList* children = gtk_container_get_children( | 101 GList* children = gtk_container_get_children( |
102 GTK_CONTAINER(bookmark_bar_->bookmark_toolbar_.get())); | 102 GTK_CONTAINER(bookmark_bar_->bookmark_toolbar_.get())); |
103 EXPECT_EQ(2U, g_list_length(children)); | 103 EXPECT_EQ(2U, g_list_length(children)); |
104 g_list_free(children); | 104 g_list_free(children); |
105 } | 105 } |
OLD | NEW |