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

Side by Side Diff: chrome/browser/ui/app_list/app_context_menu_unittest.cc

Issue 2205843004: [Merge to M53] arc: Initial implemetation of Chrome sync for Arc packages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <unordered_set> 7 #include <unordered_set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 EXPECT_TRUE(menu->IsEnabledAt(2)); 377 EXPECT_TRUE(menu->IsEnabledAt(2));
378 EXPECT_FALSE(menu->IsItemCheckedAt(2)); 378 EXPECT_FALSE(menu->IsItemCheckedAt(2));
379 EXPECT_EQ(app_list::AppContextMenu::SHOW_APP_INFO, menu->GetCommandIdAt(3)); 379 EXPECT_EQ(app_list::AppContextMenu::SHOW_APP_INFO, menu->GetCommandIdAt(3));
380 EXPECT_TRUE(menu->IsEnabledAt(3)); 380 EXPECT_TRUE(menu->IsEnabledAt(3));
381 EXPECT_FALSE(menu->IsItemCheckedAt(3)); 381 EXPECT_FALSE(menu->IsItemCheckedAt(3));
382 382
383 // Test activate request. 383 // Test activate request.
384 EXPECT_EQ(0u, arc_test.app_instance()->launch_requests().size()); 384 EXPECT_EQ(0u, arc_test.app_instance()->launch_requests().size());
385 385
386 menu->ActivatedAt(0); 386 menu->ActivatedAt(0);
387 arc_test.app_instance()->WaitForIncomingMethodCall();
388 387
389 const ScopedVector<arc::FakeAppInstance::Request>& launch_requests = 388 const ScopedVector<arc::FakeAppInstance::Request>& launch_requests =
390 arc_test.app_instance()->launch_requests(); 389 arc_test.app_instance()->launch_requests();
391 ASSERT_EQ(1u, launch_requests.size()); 390 ASSERT_EQ(1u, launch_requests.size());
392 EXPECT_TRUE(launch_requests[0]->IsForApp(app_info)); 391 EXPECT_TRUE(launch_requests[0]->IsForApp(app_info));
393 392
394 controller()->SetAppOpen(app_id, true); 393 controller()->SetAppOpen(app_id, true);
395 // It is not expected that menu model is unchanged on GetContextMenuModel. Arc 394 // It is not expected that menu model is unchanged on GetContextMenuModel. Arc
396 // app menu requires model to be recalculated. 395 // app menu requires model to be recalculated.
397 menu = item.GetContextMenuModel(); 396 menu = item.GetContextMenuModel();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 EXPECT_EQ(-1, menu->GetCommandIdAt(3)); // separator 474 EXPECT_EQ(-1, menu->GetCommandIdAt(3)); // separator
476 EXPECT_EQ(app_list::AppContextMenu::UNINSTALL, menu->GetCommandIdAt(4)); 475 EXPECT_EQ(app_list::AppContextMenu::UNINSTALL, menu->GetCommandIdAt(4));
477 EXPECT_TRUE(menu->IsEnabledAt(4)); 476 EXPECT_TRUE(menu->IsEnabledAt(4));
478 EXPECT_FALSE(menu->IsItemCheckedAt(4)); 477 EXPECT_FALSE(menu->IsItemCheckedAt(4));
479 EXPECT_EQ(app_list::AppContextMenu::SHOW_APP_INFO, menu->GetCommandIdAt(5)); 478 EXPECT_EQ(app_list::AppContextMenu::SHOW_APP_INFO, menu->GetCommandIdAt(5));
480 EXPECT_TRUE(menu->IsEnabledAt(5)); 479 EXPECT_TRUE(menu->IsEnabledAt(5));
481 EXPECT_FALSE(menu->IsItemCheckedAt(5)); 480 EXPECT_FALSE(menu->IsItemCheckedAt(5));
482 } 481 }
483 } 482 }
484 #endif 483 #endif
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory_unittest.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698