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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 1885683005: Add module suffix in .mojom files for components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 654
655 #if defined(OS_CHROMEOS) 655 #if defined(OS_CHROMEOS)
656 void InstallArcApps() { 656 void InstallArcApps() {
657 arc_test_.app_instance()->RefreshAppList(); 657 arc_test_.app_instance()->RefreshAppList();
658 arc_test_.app_instance()->SendRefreshAppList(arc_test_.fake_apps()); 658 arc_test_.app_instance()->SendRefreshAppList(arc_test_.fake_apps());
659 } 659 }
660 660
661 void UninstallArcApps() { 661 void UninstallArcApps() {
662 arc_test_.app_instance()->RefreshAppList(); 662 arc_test_.app_instance()->RefreshAppList();
663 arc_test_.app_instance()->SendRefreshAppList(std::vector<arc::AppInfo>()); 663 arc_test_.app_instance()->SendRefreshAppList(
664 std::vector<arc::mojom::AppInfo>());
664 } 665 }
665 666
666 // Creates app window and set optional Arc application id. 667 // Creates app window and set optional Arc application id.
667 views::Widget* CreateAppWindow(std::string* window_app_id) { 668 views::Widget* CreateAppWindow(std::string* window_app_id) {
668 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 669 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
669 params.bounds = gfx::Rect(5, 5, 20, 20); 670 params.bounds = gfx::Rect(5, 5, 20, 20);
670 views::Widget* widget = new views::Widget(); 671 views::Widget* widget = new views::Widget();
671 widget->Init(params); 672 widget->Init(params);
672 widget->Show(); 673 widget->Show();
673 widget->Activate(); 674 widget->Activate();
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 EXPECT_EQ("AppList, Chrome, App1, Fake App 0, App2", GetPinnedAppStatus()); 1465 EXPECT_EQ("AppList, Chrome, App1, Fake App 0, App2", GetPinnedAppStatus());
1465 UninstallArcApps(); 1466 UninstallArcApps();
1466 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 1467 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
1467 InstallArcApps(); 1468 InstallArcApps();
1468 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 1469 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
1469 } 1470 }
1470 1471
1471 TEST_F(ChromeLauncherControllerTest, ArcAppShelf) { 1472 TEST_F(ChromeLauncherControllerTest, ArcAppShelf) {
1472 InitLauncherController(); 1473 InitLauncherController();
1473 1474
1474 const arc::AppInfo& app_info = arc_test_.fake_apps()[0]; 1475 const arc::mojom::AppInfo& app_info = arc_test_.fake_apps()[0];
1475 const std::string arc_app_id = ArcAppTest::GetAppId(app_info); 1476 const std::string arc_app_id = ArcAppTest::GetAppId(app_info);
1476 1477
1477 InstallArcApps(); 1478 InstallArcApps();
1478 1479
1479 EXPECT_FALSE(launcher_controller_->IsAppPinned(arc_app_id)); 1480 EXPECT_FALSE(launcher_controller_->IsAppPinned(arc_app_id));
1480 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id)); 1481 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id));
1481 1482
1482 arc_test_.app_instance()->SetTaskInfo(100, app_info.package_name, 1483 arc_test_.app_instance()->SetTaskInfo(100, app_info.package_name,
1483 app_info.activity); 1484 app_info.activity);
1484 1485
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
2994 EXPECT_EQ(1, app_icon_loader1->clear_count()); 2995 EXPECT_EQ(1, app_icon_loader1->clear_count());
2995 EXPECT_EQ(1, app_icon_loader2->fetch_count()); 2996 EXPECT_EQ(1, app_icon_loader2->fetch_count());
2996 EXPECT_EQ(1, app_icon_loader2->clear_count()); 2997 EXPECT_EQ(1, app_icon_loader2->clear_count());
2997 2998
2998 launcher_controller_->CloseLauncherItem(shelfId3); 2999 launcher_controller_->CloseLauncherItem(shelfId3);
2999 EXPECT_EQ(1, app_icon_loader1->fetch_count()); 3000 EXPECT_EQ(1, app_icon_loader1->fetch_count());
3000 EXPECT_EQ(1, app_icon_loader1->clear_count()); 3001 EXPECT_EQ(1, app_icon_loader1->clear_count());
3001 EXPECT_EQ(1, app_icon_loader2->fetch_count()); 3002 EXPECT_EQ(1, app_icon_loader2->fetch_count());
3002 EXPECT_EQ(1, app_icon_loader2->clear_count()); 3003 EXPECT_EQ(1, app_icon_loader2->clear_count());
3003 } 3004 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc ('k') | chrome/gpu/chrome_content_gpu_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698