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

Unified Diff: chrome/browser/ui/omnibox/action_box_browsertest.cc

Issue 11348143: Fix ASAN issue in ActionBoxTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/action_box_browsertest.cc
diff --git a/chrome/browser/ui/omnibox/action_box_browsertest.cc b/chrome/browser/ui/omnibox/action_box_browsertest.cc
index 5fea21e81b7b8cb8251b3fa17b03858bcfeadc90..6e2c1f87f363c99177dca2aa9d597e210679b617 100644
--- a/chrome/browser/ui/omnibox/action_box_browsertest.cc
+++ b/chrome/browser/ui/omnibox/action_box_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/string16.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -84,14 +85,15 @@ IN_PROC_BROWSER_TEST_F(ActionBoxTest, BookmarkAPageTest) {
ASSERT_FALSE(loc_bar->GetBookmarkStarVisibility());
// Simulate an action box click and menu item selection.
- loc_bar->TestActionBoxMenuItemSelected(IDC_BOOKMARK_PAGE);
+ chrome::ExecuteCommand(browser(), IDC_BOOKMARK_PAGE);
// Page is now bookmarked.
ASSERT_TRUE(loc_bar->GetBookmarkStarVisibility());
- // Get the BookmarkModel to unbookmark the bookmark.
+ // Get the BookmarkModel to unbookmark the bookmark.
BookmarkModel* model =
BookmarkModelFactory::GetForProfile(browser()->profile());
+ ui_test_utils::WaitForBookmarkModelToLoad(model);
bookmark_utils::RemoveAllBookmarks(model, GURL("http://www.google.com"));
// Page is now unbookmarked.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698