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

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

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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_editor_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 GURL(test_base + "oa")); 92 GURL(test_base + "oa"));
93 const BookmarkNode* of1 = 93 const BookmarkNode* of1 =
94 model_->AddFolder(model_->other_node(), 1, ASCIIToUTF16("OF1")); 94 model_->AddFolder(model_->other_node(), 1, ASCIIToUTF16("OF1"));
95 model_->AddURL(of1, 0, ASCIIToUTF16("of1a"), GURL(test_base + "of1a")); 95 model_->AddURL(of1, 0, ASCIIToUTF16("of1a"), GURL(test_base + "of1a"));
96 96
97 // Children of the mobile node. 97 // Children of the mobile node.
98 model_->AddURL(model_->mobile_node(), 0, ASCIIToUTF16("sa"), 98 model_->AddURL(model_->mobile_node(), 0, ASCIIToUTF16("sa"),
99 GURL(test_base + "sa")); 99 GURL(test_base + "sa"));
100 } 100 }
101 101
102 MessageLoopForUI message_loop_; 102 base::MessageLoopForUI message_loop_;
103 content::TestBrowserThread ui_thread_; 103 content::TestBrowserThread ui_thread_;
104 content::TestBrowserThread file_thread_; 104 content::TestBrowserThread file_thread_;
105 }; 105 };
106 106
107 // Makes sure the tree model matches that of the bookmark bar model. 107 // Makes sure the tree model matches that of the bookmark bar model.
108 TEST_F(BookmarkEditorGtkTest, ModelsMatch) { 108 TEST_F(BookmarkEditorGtkTest, ModelsMatch) {
109 BookmarkEditorGtk editor( 109 BookmarkEditorGtk editor(
110 NULL, 110 NULL,
111 profile_.get(), 111 profile_.get(),
112 NULL, 112 NULL,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a"); 339 gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a");
340 340
341 editor.ApplyEdits(); 341 editor.ApplyEdits();
342 342
343 const BookmarkNode* other_node = model_->other_node(); 343 const BookmarkNode* other_node = model_->other_node();
344 ASSERT_EQ(2, other_node->child_count()); 344 ASSERT_EQ(2, other_node->child_count());
345 345
346 const BookmarkNode* new_node = other_node->GetChild(0); 346 const BookmarkNode* new_node = other_node->GetChild(0);
347 EXPECT_EQ(ASCIIToUTF16("new_a"), new_node->GetTitle()); 347 EXPECT_EQ(ASCIIToUTF16("new_a"), new_node->GetTitle());
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc ('k') | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698