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

Unified Diff: chrome/browser/ui/app_list/app_context_menu_unittest.cc

Issue 2146573005: Revert of arc: Use the new InstanceHolder for unittests (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@bridge_refactor_first
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_context_menu_unittest.cc
diff --git a/chrome/browser/ui/app_list/app_context_menu_unittest.cc b/chrome/browser/ui/app_list/app_context_menu_unittest.cc
index 06c4be2d85998e7081b8fb3fbc7c6b8cbb7ee68c..e864e499e6afe8c35de32356f8439e78bfdfba31 100644
--- a/chrome/browser/ui/app_list/app_context_menu_unittest.cc
+++ b/chrome/browser/ui/app_list/app_context_menu_unittest.cc
@@ -177,10 +177,10 @@
return profile_.get();
}
- void AddSeparator(std::vector<MenuState>* states) {
- if (states->empty() || states->back().command_id == -1)
+ void AddSeparator(std::vector<MenuState>& states) {
+ if (states.empty() || states.back().command_id == -1)
return;
- states->push_back(MenuState());
+ states.push_back(MenuState());
}
void TestExtensionApp(const std::string& app_id,
@@ -206,7 +206,7 @@
if (!platform_app)
states.push_back(MenuState(app_list::AppContextMenu::LAUNCH_NEW));
if (pinnable != AppListControllerDelegate::NO_PIN) {
- AddSeparator(&states);
+ AddSeparator(states);
states.push_back(MenuState(
app_list::AppContextMenu::TOGGLE_PIN,
pinnable != AppListControllerDelegate::PIN_FIXED,
@@ -214,7 +214,7 @@
}
if (can_create_shortcuts)
states.push_back(MenuState(app_list::AppContextMenu::CREATE_SHORTCUTS));
- AddSeparator(&states);
+ AddSeparator(states);
if (!platform_app) {
if (extensions::util::CanHostedAppsOpenInWindows() &&
@@ -244,7 +244,7 @@
true,
launch_type == extensions::LAUNCH_TYPE_FULLSCREEN));
}
- AddSeparator(&states);
+ AddSeparator(states);
states.push_back(MenuState(app_list::AppContextMenu::OPTIONS,
false,
false));
@@ -376,6 +376,7 @@
EXPECT_EQ(0u, arc_test.app_instance()->launch_requests().size());
menu->ActivatedAt(0);
+ arc_test.app_instance()->WaitForIncomingMethodCall();
const ScopedVector<arc::FakeAppInstance::Request>& launch_requests =
arc_test.app_instance()->launch_requests();
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698