Commit 54d5a6bc authored by Azeem Arshad's avatar Azeem Arshad Committed by Chromium LUCI CQ

Roll src/third_party/cros_system_api/ adce67ac5..1ee85a708 (6 commits)

This CL also updates hermes dbus constant references
that were pulled in with this uprev.

https://chromium.googlesource.com/chromiumos/platform2/system_api.git/+log/adce67ac57ed..1ee85a708f6a

$ git log adce67ac5..1ee85a708 --date=short --no-merges --format='%ad %ae %s'
2021-01-20 pholla system_api: Fix hermes's dbus constants
2021-01-13 kimjae minios: Daemonize minios
2020-11-05 damiendejean shill: add always-on VPN configuration to Profile.
2020-11-11 kevinptt runtime_probe: use ProbeConfigLoader to load probe configs
2020-12-22 yich system_api: moving bootlockbox-protos to shared lib
2020-12-22 yich system_api: build tpm_manager goprotos

Created with:
  roll-dep src/third_party/cros_system_api

Bug: 1093185
Change-Id: I247131016f8019892ac9645b440473d202046ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2641195
Commit-Queue: Azeem Arshad <azeemarshad@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845509}
parent 637ffa5c
......@@ -892,7 +892,7 @@ deps = {
# For Linux and Chromium OS.
'src/third_party/cros_system_api': {
'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + 'adce67ac57ed882a52d04d4838677834b337ee56',
'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + '1ee85a708f6a96e4123fe7825d283dbae5c50c47',
'condition': 'checkout_linux',
},
......
......@@ -22,18 +22,13 @@ namespace chromeos {
namespace {
HermesEuiccClient* g_instance = nullptr;
// TODO(1093185) Update with constants from cros_system_api when it uprevs.
const char kEidProperty[] = "Eid";
const char kRequestInstalledProfiles[] = "RequestInstalledProfiles";
const char kRequestPendingProfiles[] = "RequestPendingProfiles";
} // namespace
HermesEuiccClient::Properties::Properties(
dbus::ObjectProxy* object_proxy,
const PropertyChangedCallback& callback)
: dbus::PropertySet(object_proxy, hermes::kHermesEuiccInterface, callback) {
RegisterProperty(kEidProperty, &eid_);
RegisterProperty(hermes::euicc::kEidProperty, &eid_);
RegisterProperty(hermes::euicc::kIsActiveProperty, &is_active_);
RegisterProperty(hermes::euicc::kInstalledProfilesProperty,
&installed_carrier_profiles_);
......@@ -90,7 +85,7 @@ class HermesEuiccClientImpl : public HermesEuiccClient {
void RequestInstalledProfiles(const dbus::ObjectPath& euicc_path,
HermesResponseCallback callback) override {
dbus::MethodCall method_call(hermes::kHermesEuiccInterface,
kRequestInstalledProfiles);
hermes::euicc::kRequestInstalledProfiles);
dbus::ObjectProxy* object_proxy = GetOrCreateProperties(euicc_path).first;
object_proxy->CallMethodWithErrorResponse(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
......@@ -101,7 +96,7 @@ class HermesEuiccClientImpl : public HermesEuiccClient {
void RequestPendingProfiles(const dbus::ObjectPath& euicc_path,
HermesResponseCallback callback) override {
dbus::MethodCall method_call(hermes::kHermesEuiccInterface,
kRequestPendingProfiles);
hermes::euicc::kRequestPendingProfiles);
dbus::ObjectProxy* object_proxy = GetOrCreateProperties(euicc_path).first;
object_proxy->CallMethodWithErrorResponse(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
......
......@@ -23,10 +23,6 @@ namespace chromeos {
namespace {
// TODO(1093185) Update with constants from cros_system_api when it uprevs.
const char kRequestInstalledProfiles[] = "RequestInstalledProfiles";
const char kRequestPendingProfiles[] = "RequestPendingProfiles";
const char* kInvalidPath = "/test/invalid/path";
const char* kTestActivationCode = "abc123";
const char* kTestConfirmationCode = "def456";
......@@ -225,12 +221,12 @@ TEST_F(HermesEuiccClientTest, TestInstallPendingProfile) {
TEST_F(HermesEuiccClientTest, TestRequestInstalledProfiles) {
dbus::ObjectPath test_euicc_path(kTestEuiccPath);
dbus::MethodCall method_call(hermes::kHermesEuiccInterface,
kRequestInstalledProfiles);
hermes::euicc::kRequestInstalledProfiles);
method_call.SetSerial(123);
EXPECT_CALL(
*proxy_.get(),
DoCallMethodWithErrorResponse(
hermes_test_utils::MatchMethodName(kRequestInstalledProfiles), _, _))
EXPECT_CALL(*proxy_.get(), DoCallMethodWithErrorResponse(
hermes_test_utils::MatchMethodName(
hermes::euicc::kRequestInstalledProfiles),
_, _))
.Times(2)
.WillRepeatedly(Invoke(this, &HermesEuiccClientTest::OnMethodCalled));
......@@ -260,12 +256,12 @@ TEST_F(HermesEuiccClientTest, TestRequestInstalledProfiles) {
TEST_F(HermesEuiccClientTest, TestRequestPendingProfiles) {
dbus::ObjectPath test_euicc_path(kTestEuiccPath);
dbus::MethodCall method_call(hermes::kHermesEuiccInterface,
kRequestPendingProfiles);
hermes::euicc::kRequestPendingProfiles);
method_call.SetSerial(123);
EXPECT_CALL(
*proxy_.get(),
DoCallMethodWithErrorResponse(
hermes_test_utils::MatchMethodName(kRequestPendingProfiles), _, _))
EXPECT_CALL(*proxy_.get(), DoCallMethodWithErrorResponse(
hermes_test_utils::MatchMethodName(
hermes::euicc::kRequestPendingProfiles),
_, _))
.Times(2)
.WillRepeatedly(Invoke(this, &HermesEuiccClientTest::OnMethodCalled));
......@@ -296,12 +292,12 @@ TEST_F(HermesEuiccClientTest, TestUninstallProfile) {
dbus::ObjectPath test_euicc_path(kTestEuiccPath);
dbus::ObjectPath test_carrier_path(kTestCarrierProfilePath);
dbus::MethodCall method_call(hermes::kHermesEuiccInterface,
hermes::euicc::kRequestPendingEvents);
hermes::euicc::kUninstallProfile);
method_call.SetSerial(123);
EXPECT_CALL(*proxy_.get(),
DoCallMethodWithErrorResponse(
MatchUninstallProfileCall(test_carrier_path), _, _))
.Times(1)
.Times(2)
.WillRepeatedly(Invoke(this, &HermesEuiccClientTest::OnMethodCalled));
HermesResponseStatus status;
......@@ -314,6 +310,17 @@ TEST_F(HermesEuiccClientTest, TestUninstallProfile) {
base::BindOnce(&hermes_test_utils::CopyHermesStatus, &status));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(status, HermesResponseStatus::kSuccess);
// Verify that error responses are returned properly.
std::unique_ptr<dbus::ErrorResponse> error_response =
dbus::ErrorResponse::FromMethodCall(&method_call, hermes::kErrorUnknown,
"");
AddPendingMethodCallResult(nullptr, std::move(error_response));
client_->UninstallProfile(
test_euicc_path, test_carrier_path,
base::BindOnce(&hermes_test_utils::CopyHermesStatus, &status));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(status, HermesResponseStatus::kErrorUnknown);
}
} // namespace chromeos
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment