OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/chromeos/lock_screen_apps/app_manager_impl.h" | 5 #include "chrome/browser/chromeos/lock_screen_apps/app_manager_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 ASSERT_TRUE(arg_value); | 77 ASSERT_TRUE(arg_value); |
78 if (event->restrict_to_browser_context) | 78 if (event->restrict_to_browser_context) |
79 EXPECT_EQ(context_, event->restrict_to_browser_context); | 79 EXPECT_EQ(context_, event->restrict_to_browser_context); |
80 | 80 |
81 std::unique_ptr<extensions::api::app_runtime::LaunchData> launch_data = | 81 std::unique_ptr<extensions::api::app_runtime::LaunchData> launch_data = |
82 extensions::api::app_runtime::LaunchData::FromValue(*arg_value); | 82 extensions::api::app_runtime::LaunchData::FromValue(*arg_value); |
83 ASSERT_TRUE(launch_data); | 83 ASSERT_TRUE(launch_data); |
84 ASSERT_TRUE(launch_data->action_data); | 84 ASSERT_TRUE(launch_data->action_data); |
85 EXPECT_EQ(extensions::api::app_runtime::ACTION_TYPE_NEW_NOTE, | 85 EXPECT_EQ(extensions::api::app_runtime::ACTION_TYPE_NEW_NOTE, |
86 launch_data->action_data->action_type); | 86 launch_data->action_data->action_type); |
| 87 ASSERT_TRUE(launch_data->action_data->is_lock_screen_action); |
| 88 EXPECT_TRUE(*launch_data->action_data->is_lock_screen_action); |
87 | 89 |
88 launched_apps_.push_back(extension_id); | 90 launched_apps_.push_back(extension_id); |
89 } | 91 } |
90 | 92 |
91 const std::vector<std::string>& launched_apps() const { | 93 const std::vector<std::string>& launched_apps() const { |
92 return launched_apps_; | 94 return launched_apps_; |
93 } | 95 } |
94 | 96 |
95 void ClearLaunchedApps() { launched_apps_.clear(); } | 97 void ClearLaunchedApps() { launched_apps_.clear(); } |
96 | 98 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 677 |
676 EXPECT_FALSE(app_manager()->LaunchNoteTaking()); | 678 EXPECT_FALSE(app_manager()->LaunchNoteTaking()); |
677 EXPECT_TRUE(event_router->launched_apps().empty()); | 679 EXPECT_TRUE(event_router->launched_apps().empty()); |
678 | 680 |
679 app_manager()->Stop(); | 681 app_manager()->Stop(); |
680 EXPECT_FALSE(app_manager()->LaunchNoteTaking()); | 682 EXPECT_FALSE(app_manager()->LaunchNoteTaking()); |
681 EXPECT_TRUE(event_router->launched_apps().empty()); | 683 EXPECT_TRUE(event_router->launched_apps().empty()); |
682 } | 684 } |
683 | 685 |
684 } // namespace lock_screen_apps | 686 } // namespace lock_screen_apps |
OLD | NEW |