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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
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/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bookmark_bar_->Loaded(model_, false); 66 bookmark_bar_->Loaded(model_, false);
67 67
68 // There are no bookmarks in the model by default. Expect that the 68 // There are no bookmarks in the model by default. Expect that the
69 // |instructions_label| is shown. 69 // |instructions_label| is shown.
70 EXPECT_TRUE(bookmark_bar_->show_instructions_); 70 EXPECT_TRUE(bookmark_bar_->show_instructions_);
71 } 71 }
72 72
73 TEST_F(BookmarkBarGtkUnittest, HidesHelpMessageWithBookmark) { 73 TEST_F(BookmarkBarGtkUnittest, HidesHelpMessageWithBookmark) {
74 const BookmarkNode* parent = model_->bookmark_bar_node(); 74 const BookmarkNode* parent = model_->bookmark_bar_node();
75 model_->AddURL(parent, parent->child_count(), 75 model_->AddURL(parent, parent->child_count(),
76 ASCIIToUTF16("title"), GURL("http://one.com")); 76 base::ASCIIToUTF16("title"), GURL("http://one.com"));
77 77
78 bookmark_bar_->Loaded(model_, false); 78 bookmark_bar_->Loaded(model_, false);
79 EXPECT_FALSE(bookmark_bar_->show_instructions_); 79 EXPECT_FALSE(bookmark_bar_->show_instructions_);
80 } 80 }
81 81
82 TEST_F(BookmarkBarGtkUnittest, BuildsButtons) { 82 TEST_F(BookmarkBarGtkUnittest, BuildsButtons) {
83 const BookmarkNode* parent = model_->bookmark_bar_node(); 83 const BookmarkNode* parent = model_->bookmark_bar_node();
84 model_->AddURL(parent, parent->child_count(), 84 model_->AddURL(parent, parent->child_count(),
85 ASCIIToUTF16("title"), GURL("http://one.com")); 85 base::ASCIIToUTF16("title"), GURL("http://one.com"));
86 model_->AddURL(parent, parent->child_count(), 86 model_->AddURL(parent, parent->child_count(),
87 ASCIIToUTF16("other"), GURL("http://two.com")); 87 base::ASCIIToUTF16("other"), GURL("http://two.com"));
88 88
89 bookmark_bar_->Loaded(model_, false); 89 bookmark_bar_->Loaded(model_, false);
90 90
91 // We should expect two children to the bookmark bar's toolbar. 91 // We should expect two children to the bookmark bar's toolbar.
92 GList* children = gtk_container_get_children( 92 GList* children = gtk_container_get_children(
93 GTK_CONTAINER(bookmark_bar_->bookmark_toolbar_.get())); 93 GTK_CONTAINER(bookmark_bar_->bookmark_toolbar_.get()));
94 EXPECT_EQ(2U, g_list_length(children)); 94 EXPECT_EQ(2U, g_list_length(children));
95 g_list_free(children); 95 g_list_free(children);
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_item_gtk.cc ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698