Add unit tests for page sharing, and check for sharing from private dir.
We should not be sharing files from our private directory, they are not sharable, and could cause a crash. This change marks the file as not sharable (when the P2P sharing flag is turned on) so we avoid the crash. To tell if the file is in a private directory, we add a new file to the OfflinePageBridge to get the information from the C++ side. Previously there were no unit tests for maybeShareOfflinePage(). This change adds some unit tests for it as a basis for checking the sharing restriction, then adds more tests for the sharing restriction. Bug: 817611 Change-Id: Ic0361a6eaf2698562a4998c2e027081c76318bc5 Reviewed-on: https://chromium-review.googlesource.com/961542 Commit-Queue: Peter Williamson <petewil@chromium.org> Reviewed-by:Jian Li <jianli@chromium.org> Cr-Commit-Position: refs/heads/master@{#543851}
Showing
This diff is collapsed.
Please register or sign in to comment