Commit 17833a53 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Revert "[filesapp] Add a files app SWA load test"

This reverts commit a1b6965a.

Reason for revert: test failures reported, e.g.
https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-chrome/9520

Original change's description:
> [filesapp] Add a files app SWA load test
>
> Add a files app SWA integration test: test that files app SWA loads in
> the files app browser test harness.
>
> Remember the SWA web_contents so we can shut it down at the end of the
> test. Supports only one running files app SWA instance for now.
>
> Test: browser_tests --gtest_filter="*launchFilesAppSwa*"
> Bug: 1113981
> Change-Id: I78b4fafab57622fecc134b009858554bdcb05126
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2507316
> Commit-Queue: Noel Gordon <noel@chromium.org>
> Reviewed-by: Luciano Pacheco <lucmult@chromium.org>
> Reviewed-by: Alex Danilo <adanilo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#822544}

TBR=noel@chromium.org,lucmult@chromium.org,adanilo@chromium.org,majewski@chromium.org

Change-Id: I1409cf4f17dc70b5cf2af08b7839de6279c3c7ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1113981
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2509575Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822591}
parent 60626592
......@@ -991,12 +991,6 @@ WRAPPED_INSTANTIATE_TEST_SUITE_P(
FilesAppBrowserTest,
::testing::Values(TestCase("installLinuxPackageDialog")));
WRAPPED_INSTANTIATE_TEST_SUITE_P(
LaunchFilesAppSwa, /* launch_files_app_swa.js */
FilesAppBrowserTest,
::testing::Values(TestCase("launchFilesAppSwa").FilesSwa(),
TestCase("launchFilesAppSwa").FilesSwa().InGuestMode()));
WRAPPED_INSTANTIATE_TEST_SUITE_P(
LauncherSearch, /* launcher_search.js */
FilesAppBrowserTest,
......
......@@ -28,10 +28,8 @@
#include "base/test/bind_test_util.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "chrome/browser/apps/app_service/app_launch_params.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/apps/app_service/browser_app_launcher.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h"
#include "chrome/browser/chromeos/arc/fileapi/arc_media_view_util.h"
......@@ -1884,10 +1882,6 @@ void FileManagerBrowserTestBase::SetUpOnMainThread() {
}
void FileManagerBrowserTestBase::TearDownOnMainThread() {
if (files_app_web_contents_) {
files_app_web_contents_->Close();
}
file_tasks_observer_.reset();
select_factory_ = nullptr;
ui::SelectFileDialog::SetFactory(nullptr);
......@@ -2016,26 +2010,6 @@ void FileManagerBrowserTestBase::OnCommand(const std::string& name,
return;
}
if (name == "launchFileManagerSwa") {
apps::AppLaunchParams params(
files_app_swa_id_, apps::mojom::LaunchContainer::kLaunchContainerWindow,
WindowOpenDisposition::NEW_FOREGROUND_TAB,
apps::mojom::AppLaunchSource::kSourceTest);
content::WebContents* web_contents =
apps::AppServiceProxyFactory::GetForProfile(profile())
->BrowserAppLauncher()
->LaunchAppWithParams(std::move(params));
CHECK(web_contents);
content::WaitForLoadStop(web_contents);
LOG(INFO) << name << " url " << web_contents->GetLastCommittedURL();
files_app_web_contents_ = web_contents;
*output = files_app_swa_id_;
return;
}
if (name == "launchAppOnDrive") {
auto* integration_service =
drive::DriveIntegrationServiceFactory::FindForProfile(profile());
......
......@@ -28,10 +28,6 @@ namespace arc {
class FakeFileSystemInstance;
} // namespace arc
namespace content {
class WebContents;
} // namespace content
namespace file_manager {
enum GuestMode { NOT_IN_GUEST_MODE, IN_GUEST_MODE, IN_INCOGNITO };
......@@ -183,7 +179,6 @@ class FileManagerBrowserTestBase : public content::DevToolsAgentHostObserver,
bool IsSmbEnabled() const;
web_app::AppId files_app_swa_id_;
content::WebContents* files_app_web_contents_ = nullptr;
std::unique_ptr<base::test::ScopedFeatureList> feature_list_;
crostini::FakeCrostiniFeatures crostini_features_;
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
(() => {
/**
* Tests that files app SWA launches.
*/
testcase.launchFilesAppSwa = async () => {
const caller = getCaller();
const swaAppId = await sendTestMessage({
name: 'launchFileManagerSwa',
});
console.log('file_manager_swa_id: ' + swaAppId);
await repeatUntil(async () => {
const launched = await sendTestMessage({
name: 'hasSwaStarted',
swaAppId: swaAppId,
});
if (launched !== 'true') {
return pending(caller, 'Waiting for files app SWA launch');
}
});
return IGNORE_APP_ERRORS;
};
})();
......@@ -31,7 +31,6 @@
"file_manager/grid_view.js",
"file_manager/install_linux_package_dialog.js",
"file_manager/keyboard_operations.js",
"file_manager/launch_files_app_swa.js",
"file_manager/launcher_search.js",
"file_manager/metadata.js",
"file_manager/metrics.js",
......
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