New issue
Advanced search Search tips

Issue 876973 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 24
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Pinned drive files are not selectable from open dialogs while offline

Project Member Reported by sa...@chromium.org, Aug 23

Issue description

Chrome Version: At least 67-70
OS: ChromeOS

What steps will reproduce the problem?
(1) In Drive, set a file as available offline
(2) Disconnect the network
(3) Use <c-o> from a tab to get an open dialog
(4) Try to select the file from (1)

What is the expected result?

Open button is active, double clicking the file opens it.

What happens instead?

Open button is inactive, double clicking does nothing.

The dialog decides whether the open button is active before checking whether the file is available offline, causing it to never be active for files in Drive while offline.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22bec67b19dfa1e755af6e0d59b89ff57e4ae7ef

commit 22bec67b19dfa1e755af6e0d59b89ff57e4ae7ef
Author: Sam McNally <sammc@chromium.org>
Date: Thu Aug 23 11:34:21 2018

Fix selecting files on Drive from file open dialogs while offline.

When offline, Drive files should only be selectable in open dialogs if
they are available offline. However, this is calculated after the ok
button enabled state is updated, resulting in Drive files always being
unselectable while offline.

Wait until the available offline property of the selected files has been
retrieved and used to set the allFilesPresent field on the selection
before dispatching the CHANGED_THROTTLED event.

Also update the ok button on drive-connection-change events so the
button is updated when the network connectivity changes and a file in
Drive, not available offline, is selected.

Bug:  876973 
Change-Id: I15fe35e18a15f3211f395c63b8c01b5a7c7846d7
Reviewed-on: https://chromium-review.googlesource.com/1186210
Reviewed-by: Noel Gordon <noel@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585450}
[modify] https://crrev.com/22bec67b19dfa1e755af6e0d59b89ff57e4ae7ef/ui/file_manager/file_manager/foreground/js/dialog_action_controller.js
[modify] https://crrev.com/22bec67b19dfa1e755af6e0d59b89ff57e4ae7ef/ui/file_manager/file_manager/foreground/js/file_selection.js

Status: Fixed (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5082949478bb77009d6f48f83bb498a1b7764133

commit 5082949478bb77009d6f48f83bb498a1b7764133
Author: Sam McNally <sammc@chromium.org>
Date: Mon Aug 27 07:50:29 2018

Add tests for selecting Drive files while offline.

The file manager integration tests currently have no coverage for
offline Drive. Add tests to ensure the file chooser dialog allows the
selection of Drive files that are available offline while offline.

These tests only run with DriveFS enabled due to the lack of controls
available to set up the test scenarios with the existing Drive sync
client.

Bug:  876973 
Change-Id: I81e39fba868a073fd82a457004700bb0ebb566ec
Reviewed-on: https://chromium-review.googlesource.com/1189515
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586208}
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/chromeos/components/drivefs/fake_drivefs.cc
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/chromeos/components/drivefs/fake_drivefs.h
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/ui/file_manager/file_manager/foreground/js/dialog_action_controller.js
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/ui/file_manager/integration_tests/file_manager/file_dialog.js
[modify] https://crrev.com/5082949478bb77009d6f48f83bb498a1b7764133/ui/file_manager/integration_tests/test_util.js

Sign in to add a comment