From 0c510206f6ea97bf2a73aa773c99f53bc40099cb Mon Sep 17 00:00:00 2001 From: Gordon Seto Date: Thu, 15 Apr 2021 17:05:07 +0000 Subject: [PATCH] [CrOS Cellular] Network item fetch managedProperties if non-empty guid. Update network-list-item to only fetch managedProperties if its networkState's guid is non-empty. This call was temporarily wrapped behind the cellular flag because it was causing OOBE tests to fail. This was because network-select can contain dummy networks with empty properties, such as guid. Bug: 1093185 Change-Id: I864acb0977a92b0e2daed48056caba581b190bf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2827192 Commit-Queue: Gordon Seto Reviewed-by: Kyle Horimoto Cr-Commit-Position: refs/heads/master@{#872912} --- .../cr_components/chromeos/network/network_list_item.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/webui/resources/cr_components/chromeos/network/network_list_item.js b/ui/webui/resources/cr_components/chromeos/network/network_list_item.js index c09cea23c31cd2..8330d6b1bcb117 100644 --- a/ui/webui/resources/cr_components/chromeos/network/network_list_item.js +++ b/ui/webui/resources/cr_components/chromeos/network/network_list_item.js @@ -261,9 +261,10 @@ Polymer({ return; } - // Temporarily place fetching managedProperties behind this flag so OOBE - // tests pass. TODO(crbug.com/1196507) Remove this check. - if (this.isUpdatedCellularUiEnabled_) { + // network-list-item supports dummy networkStates that may have an empty + // guid, such as those set by network-select. Only fetch managedProperties_ + // if the network's guid is defined. + if (this.networkState.guid) { this.networkConfig_.getManagedProperties(this.networkState.guid) .then((response) => { this.managedProperties_ = response.result;