Commit 97dc0827 authored by David Munro's avatar David Munro Committed by Commit Bot

Crostini: Enable upgrade flow by default and workaround a test hang

On track to launch for realsies this milestone. Additionally, PM
guidance was that we should be enabling then merging a change to disable
(if needed) before stable rather than using Finch which is what we're
currently doing.

The test check was hanging, and since the condition was never true
before let's remove it.

Bug: None
Test: None
Change-Id: Ie16eca37622ef1ad78c655fc7999ec7a0604286f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2308430
Commit-Queue: David Munro <davidmunro@google.com>
Reviewed-by: default avatarFergus Dall <sidereal@google.com>
Cr-Commit-Position: refs/heads/master@{#791678}
parent 49dcec3f
......@@ -31,35 +31,6 @@
namespace crostini {
class WebContentsWaiter : public content::WebContentsObserver {
public:
enum Operation { LOAD }; // Add other operations as required.
explicit WebContentsWaiter(content::WebContents* contents,
Operation operation)
: content::WebContentsObserver(contents), operation_(operation) {
LOG(INFO) << "Waiting for web contents";
}
~WebContentsWaiter() override = default;
void Wait() {
LOG(INFO) << "And Waiting";
run_loop_.Run();
}
// content::WebContentsObserver:
void DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) override {
if (operation_ == LOAD) {
run_loop_.Quit();
}
}
private:
base::RunLoop run_loop_;
Operation operation_;
};
class CrostiniUpgradeAvailableNotificationTest
: public BrowserWithTestWindowTest {
public:
......@@ -99,12 +70,6 @@ class CrostiniUpgradeAvailableNotificationTest
if (!upgrader_dialog) {
return;
}
// Make sure the WebUI has launches sufficiently. Closing immediately would
// miss breakages in the underlying plumbing.
if (upgrader_dialog->GetWebUIForTest()) {
auto* web_contents = upgrader_dialog->GetWebUIForTest()->GetWebContents();
WebContentsWaiter(web_contents, WebContentsWaiter::LOAD).Wait();
}
// Now there should be enough WebUI hooked up to close properly.
base::RunLoop run_loop;
......
......@@ -704,7 +704,7 @@
{
"name": "crostini-webui-upgrader",
"owners": [ "nverne", "davidmunro@google.com", "benwells" ],
"expiry_milestone": 86
"expiry_milestone": 88
},
{
"name": "cryptauth-v2-device-activity-status",
......
......@@ -122,7 +122,7 @@ const base::Feature kCrostiniUsbAllowUnsupported{
// Enables or disables the new WebUI Crostini upgrader.
const base::Feature kCrostiniWebUIUpgrader{"CrostiniWebUIUpgrader",
base::FEATURE_DISABLED_BY_DEFAULT};
base::FEATURE_ENABLED_BY_DEFAULT};
// Enables or disables using Cryptauth's GetDevicesActivityStatus API.
const base::Feature kCryptAuthV2DeviceActivityStatus{
......
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