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

Side by Side Diff: chrome/browser/ui/omnibox/action_box_browsertest.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: 53 case content::NOTIFICATION_WEB_CONTENTS_DESTROYED:
54 case chrome::NOTIFICATION_TAB_PARENTED: 54 case chrome::NOTIFICATION_TAB_PARENTED:
55 case chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY: 55 case chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY:
56 case chrome::NOTIFICATION_HISTORY_LOADED: 56 case chrome::NOTIFICATION_HISTORY_LOADED:
57 case chrome::NOTIFICATION_HISTORY_URLS_MODIFIED: 57 case chrome::NOTIFICATION_HISTORY_URLS_MODIFIED:
58 case chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED: 58 case chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED:
59 break; 59 break;
60 default: 60 default:
61 FAIL() << "Unexpected notification type"; 61 FAIL() << "Unexpected notification type";
62 } 62 }
63 MessageLoop::current()->Quit(); 63 base::MessageLoop::current()->Quit();
64 } 64 }
65 65
66 DISALLOW_COPY_AND_ASSIGN(ActionBoxTest); 66 DISALLOW_COPY_AND_ASSIGN(ActionBoxTest);
67 }; 67 };
68 68
69 // Test if Bookmark star appears after bookmarking a page in the action box, and 69 // Test if Bookmark star appears after bookmarking a page in the action box, and
70 // disappears after unbookmarking a page. 70 // disappears after unbookmarking a page.
71 IN_PROC_BROWSER_TEST_F(ActionBoxTest, BookmarkAPageTest) { 71 IN_PROC_BROWSER_TEST_F(ActionBoxTest, BookmarkAPageTest) {
72 LocationBarTesting* loc_bar = 72 LocationBarTesting* loc_bar =
73 browser()->window()->GetLocationBar()->GetLocationBarForTesting(); 73 browser()->window()->GetLocationBar()->GetLocationBarForTesting();
(...skipping 15 matching lines...) Expand all
89 // Page is now bookmarked. 89 // Page is now bookmarked.
90 ASSERT_TRUE(loc_bar->GetBookmarkStarVisibility()); 90 ASSERT_TRUE(loc_bar->GetBookmarkStarVisibility());
91 91
92 // Get the BookmarkModel to unbookmark the bookmark. 92 // Get the BookmarkModel to unbookmark the bookmark.
93 bookmark_utils::RemoveAllBookmarks(model, GURL("http://www.google.com")); 93 bookmark_utils::RemoveAllBookmarks(model, GURL("http://www.google.com"));
94 94
95 // Page is now unbookmarked. 95 // Page is now unbookmarked.
96 ASSERT_FALSE(loc_bar->GetBookmarkStarVisibility()); 96 ASSERT_FALSE(loc_bar->GetBookmarkStarVisibility());
97 97
98 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698