Commit b31d0f26 authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Deflake LocalAndDriveFileSystemExtensionApiTest.AppFileHandlerMulti.

Sort the file names - the order of entries passed to onLaunched is not
deterministic so expecting a particular order is incorrect.

Bug: 946025
Change-Id: I7c3933f916e8411e6b8357a7555999fe1ad6efe9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539494
Commit-Queue: Sam McNally <sammc@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644701}
parent b268302c
...@@ -908,14 +908,8 @@ IN_PROC_BROWSER_TEST_F(MultiProfileDriveFileSystemExtensionApiTest, ...@@ -908,14 +908,8 @@ IN_PROC_BROWSER_TEST_F(MultiProfileDriveFileSystemExtensionApiTest,
// //
// LocalAndDriveFileSystemExtensionApiTests. // LocalAndDriveFileSystemExtensionApiTests.
#if defined(ADDRESS_SANITIZER) || defined(DEBUG) || defined(MEMORY_SANITIZER)
#define MAYBE_AppFileHandlerMulti AppFileHandlerMulti
#else
// http://crbug.com/946025 flaky in RELEASE.
#define MAYBE_AppFileHandlerMulti DISABLED_AppFileHandlerMulti
#endif
IN_PROC_BROWSER_TEST_F(LocalAndDriveFileSystemExtensionApiTest, IN_PROC_BROWSER_TEST_F(LocalAndDriveFileSystemExtensionApiTest,
MAYBE_AppFileHandlerMulti) { AppFileHandlerMulti) {
EXPECT_TRUE( EXPECT_TRUE(
RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi",
FILE_PATH_LITERAL("manifest.json"), FILE_PATH_LITERAL("manifest.json"),
......
...@@ -209,12 +209,12 @@ function launchWithEntries(isolatedEntries) { ...@@ -209,12 +209,12 @@ function launchWithEntries(isolatedEntries) {
]).then(function(args) { ]).then(function(args) {
chrome.test.assertEq(entries.length, args[1].items.length); chrome.test.assertEq(entries.length, args[1].items.length);
chrome.test.assertEq( chrome.test.assertEq(
entries.map(function(entry) { return entry.name; }), entries.map(entry => entry.name).sort(),
args[1].items.map(function(item) { return item.entry.name; }), args[1].items.map(item => item.entry.name).sort(),
'Wrong entries are passed to the application handler.'); 'Wrong entries are passed to the application handler.');
chrome.test.assertEq( chrome.test.assertEq(
entries.map(function(entry) { return entry.toURL(); }), entries.map(entry => entry.toURL()).sort(),
args[2].map(function(entry) { return entry.toURL(); }), args[2].map(entry => entry.toURL()).sort(),
'Entries passed to the application handler cannot be ' + 'Entries passed to the application handler cannot be ' +
'resolved.'); 'resolved.');
}) })
......
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