Commit bfa834e9 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Re-enable two File Manager tabindex tests

Re-enable the tests listed below. These tests require legacy event
dispatch so that fake keyboard events the test sends are processed by
the Blink default event handler. If we do not do this, the fake Tab
keyboard events are not processed and thus can't move the focus.

TabindexOpenDialog/FileManagerBrowserTest.Test*
TabindexSaveFileDialog/FileManagerBrowserTest.Test*

These tests aren't supported by Mash: disable on Mash.

Bug: 836254,480491,482121
Change-Id: I91ecbfbf2944a702f473ffcb097942a61c260726
Reviewed-on: https://chromium-review.googlesource.com/1034425
Commit-Queue: Luciano Pacheco (SYD) <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554706}
parent 7c1f7128
......@@ -27,6 +27,15 @@ class FileManagerBrowserTest :
public FileManagerBrowserTestBase,
public ::testing::WithParamInterface<TestParameter> {
public:
void SetUpCommandLine(base::CommandLine* command_line) override {
FileManagerBrowserTestBase::SetUpCommandLine(command_line);
if (shouldEnableLegacyEventDispatch()) {
command_line->AppendSwitchASCII("disable-blink-features",
"TrustedEventsDefaultAction");
}
}
GuestMode GetGuestModeParam() const override {
return std::get<0>(GetParam());
}
......@@ -38,6 +47,13 @@ class FileManagerBrowserTest :
const char* GetTestManifestName() const override {
return "file_manager_test_manifest.json";
}
private:
bool shouldEnableLegacyEventDispatch() {
const std::string test_case_name = GetTestCaseNameParam();
// crbug.com/482121 crbug.com/480491
return test_case_name.find("tabindex") != std::string::npos;
}
};
IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) {
......@@ -428,30 +444,26 @@ WRAPPED_INSTANTIATE_TEST_CASE_P(
::testing::Values(TestParameter(NOT_IN_GUEST_MODE,
"tabindexFocusDirectorySelected")));
// Fails on official cros trunk build. http://crbug.com/480491
// TODO(crbug.com/836254) test broken when DISABLE removed.
#if defined(DISABLE_SLOW_FILESAPP_TESTS) || defined(OFFICIAL_BUILD)
#define MAYBE_TabindexOpenDialog DISABLED_TabindexOpenDialog
#else
#define MAYBE_TabindexOpenDialog TabindexOpenDialog
#endif
WRAPPED_INSTANTIATE_TEST_CASE_P(
DISABLED_TabindexOpenDialog,
MAYBE_TabindexOpenDialog,
FileManagerBrowserTest,
::testing::Values(
TestParameter(NOT_IN_GUEST_MODE, "tabindexOpenDialogDrive"),
TestParameter(NOT_IN_GUEST_MODE, "tabindexOpenDialogDownloads"),
TestParameter(IN_GUEST_MODE, "tabindexOpenDialogDownloads")));
// Fails on official build. http://crbug.com/482121.
// TODO(crbug.com/836254) test broken when DISABLE removed.
#if defined(DISABLE_SLOW_FILESAPP_TESTS) || defined(OFFICIAL_BUILD)
#define MAYBE_TabindexSaveFileDialog DISABLED_TabindexSaveFileDialog
#else
#define MAYBE_TabindexSaveFileDialog TabindexSaveFileDialog
#endif
WRAPPED_INSTANTIATE_TEST_CASE_P(
DISABLED_TabindexSaveFileDialog,
MAYBE_TabindexSaveFileDialog,
FileManagerBrowserTest,
::testing::Values(
TestParameter(NOT_IN_GUEST_MODE, "tabindexSaveFileDialogDrive"),
......
......@@ -337,6 +337,8 @@
-OpenVideoFiles/FileManagerBrowserTest.*
-TabindexFocusDownloads/FileManagerBrowserTestWithLegacyEventDispatch.Test/0
-TabindexFocusDownloads/FileManagerBrowserTestWithLegacyEventDispatch.Test/1
-TabindexOpenDialog/FileManagerBrowserTest.*
-TabindexSaveFileDialog/FileManagerBrowserTest.*
-DeclarativeNetRequestResourceTypeBrowserTest.Test1/1
-DeclarativeNetRequestResourceTypeBrowserTest.Test2/0
-DeclarativeNetRequestResourceTypeBrowserTest.Test2/1
......
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