Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5191)

Unified Diff: chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc

Issue 2789923002: Fix destruction order of FileSystemContext in MediaFileValidatorTest. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
index 21031470b8d243b5f8236aef1338fe47600cf694..7af22ab28387e753f53be31d7ca5f04e7e13d153 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
@@ -77,6 +77,17 @@ class MediaFileValidatorTest : public InProcessBrowserTest {
~MediaFileValidatorTest() override {}
+ void TearDownOnMainThread() override {
+ // Release our ref to |file_system_context_| before the test framework winds
+ // down, otherwise releasing it in the destructor posts a destruction task
+ // to the FILE thread after it has been shutdown (which base/task_scheduler
+ // guards against in the RedirectNonUINonIOBrowserThreads experiment per the
+ // FILE thread's tasks being marked as shutdown blocking for legacy
+ // reasons).
+ file_system_context_ = nullptr;
+ InProcessBrowserTest::TearDownOnMainThread();
+ }
+
// Write |content| into |filename| in a test file system and try to move
// it into a media file system. The result is compared to |expected_result|.
void MoveTest(const std::string& filename, const std::string& content,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698