Commit 6e8a8789 authored by Theo Johnson-kanu's avatar Theo Johnson-kanu Committed by Chromium LUCI CQ

Reland "[CrOS cellular] Respond to cellular route params in internet page"

This reverts commit 8aa524c7

Reason for revert:
The original commit was not the cause of the issue in the revert. The
bots which was failing chromeos-betty-pi-arc-chrome is passing.
original description:
> Revert "[CrOS cellular] Respond to cellular route params in internet page"
>
> This reverts commit 9ca977e3.
>
> Reason for revert: I suspect this CL caused a failure https://ci.chromium.org/p/chrome/builders/ci/chromeos-betty-pi-arc-chrome
>
> Two builds:
> https://ci.chromium.org/ui/p/chrome/builders/ci/chromeos-betty-pi-arc-chrome/11124/overview
> Test 'arc.DragDrop' completed with the following status(es): 'FAILURE'
>
> Test 'arc.DragDrop' had the following logs when run:
>
> ================================================================================
>
> Failed initializing UI Automator
>	at chromiumos/tast/local/bundles/cros/arc.DragDrop (drag_drop.go:93)
>	at chromiumos/tast/internal/planner.runTestWithRoot.func3 (run.go:755)
>	at chromiumos/tast/internal/planner.safeCall.func2 (safe.go:92)
>	at runtime.goexit (asm_amd64.s:1357)
> failed installing /usr/local/share/android-uiautomator-server/app-uiautomator.apk
>	at chromiumos/tast/local/android/ui.installServer (device.go:119)
>	at chromiumos/tast/local/android/ui.NewDevice (device.go:91)
>	at chromiumos/tast/local/arc.(*ARC).NewUIDevice (ui.go:16)
>	at chromiumos/tast/local/bundles/cros/arc.DragDrop (drag_drop.go:91)
>	at chromiumos/tast/internal/planner.runTestWithRoot.func3 (run.go:755)
>	at chromiumos/tast/internal/planner.safeCall.func2 (safe.go:92)
>	at runtime.goexit (asm_amd64.s:1357)
> context deadline exceeded
>	at ???
>
> https://ci.chromium.org/ui/p/chrome/builders/ci/chromeos-betty-pi-arc-chrome/11125/overview
> Test 'chrome_all_tast_tests' completed with the following status(es): 'FAILURE'
>
> Test 'chrome_all_tast_tests' had the following logs when run:
>
>
>
> Original change's description:
> > [CrOS cellular] Respond to cellular route params in internet page
> >
> >Bug: 1163556
> >Change-Id: I196b9c9f73fecb169b53ac3d3ed5635a799b7138
> >Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2625275
> >Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
> >Reviewed-by: Azeem Arshad <azeemarshad@chromium.org>
> >Cr-Commit-Position: refs/heads/master@{#842903}
>
> TBR=azeemarshad@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com,tjohnsonkanu@google.com
>
> Change-Id: Icd511320cc5b1df0ad54057e372b4d353fc90778
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1163556
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626432
> Reviewed-by: Maxim Kolosovskiy  <kolos@chromium.org>
> Commit-Queue: Maxim Kolosovskiy  <kolos@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#842952}

Bug: 1093185
Change-Id: I4cf802484486a9cbb77c8fb9c028ec0b284b8622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626917Reviewed-by: default avatarAzeem Arshad <azeemarshad@chromium.org>
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Cr-Commit-Position: refs/heads/master@{#843634}
parent 2e428d03
......@@ -251,6 +251,7 @@ Polymer({
// e.g. chrome://settings/internet/networks?type=WiFi
const queryParams = settings.Router.getInstance().getQueryParameters();
const type = queryParams.get('type');
this.showCellularSetupDialog_ = !!queryParams.get('showCellularSetup');
if (type) {
this.subpageType_ = OncMojo.getNetworkTypeFromString(type);
}
......
......@@ -311,6 +311,39 @@ suite('InternetPage', function() {
});
});
test(
'Show cellular setup dialog if route params contain showCellularSetup',
async function() {
loadTimeData.overrideValues({
updatedCellularActivationUi: true,
});
eSimManagerRemote.addEuiccForTest(1);
const mojom = chromeos.networkConfig.mojom;
mojoApi_.setNetworkTypeEnabledState(mojom.NetworkType.kCellular, true);
const cellularNetwork = OncMojo.getDefaultManagedProperties(
mojom.NetworkType.kCellular, 'cellular_guid', name);
cellularNetwork.connectable = false;
mojoApi_.setManagedPropertiesForTest(cellularNetwork);
await flushAsync();
let cellularSetupDialog = internetPage.$$('#cellularSetupDialog');
assertFalse(!!cellularSetupDialog);
const params = new URLSearchParams;
params.append('guid', 'cellular_guid');
params.append('type', 'Cellular');
params.append('name', 'cellular');
params.append('showCellularSetup', 'true');
settings.Router.getInstance().navigateTo(
settings.routes.INTERNET_NETWORKS, params);
await flushAsync();
cellularSetupDialog = internetPage.$$('#cellularSetupDialog');
assertTrue(!!cellularSetupDialog);
});
// TODO(stevenjb): Figure out a way to reliably test navigation. Currently
// such tests are flaky.
});
......@@ -971,7 +971,12 @@ var OSSettingsInternetPageTest = class extends OSSettingsBrowserTest {
/** @override */
get featureList() {
return {enabled: ['chromeos::features::kOsSettingsDeepLinking']};
return {
enabled: [
'chromeos::features::kOsSettingsDeepLinking',
'chromeos::features::kUpdatedCellularActivationUi',
]
};
}
/** @override */
......
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