Commit 217f9a33 authored by Daniel Murphy's avatar Daniel Murphy

[SessionStorageS13N] Fixing StoragePartitionImpl RemoveLocalStorage tests

Session was assuming that InitiateConnection() would always complete
asynchronously. In tests, this doesn't happen. This fixes one case where
a callback was registered after the call to InitiateConnection()

Bug: 716490
Change-Id: I606446ba5e5ba5907c9c37ab440cc38bef2838d8
Reviewed-on: https://chromium-review.googlesource.com/1112486Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569742}
parent 97ba8f37
......@@ -581,8 +581,9 @@ void SessionStorageContextMojo::RunWhenConnected(base::OnceClosure callback) {
case NO_CONNECTION:
// If we don't have a filesystem_connection_, we'll need to establish one.
connection_state_ = CONNECTION_IN_PROGRESS;
on_database_opened_callbacks_.push_back(std::move(callback));
InitiateConnection();
FALLTHROUGH;
return;
case CONNECTION_IN_PROGRESS:
// Queue this OpenSessionStorage call for when we have a level db pointer.
on_database_opened_callbacks_.push_back(std::move(callback));
......
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