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

Unified Diff: base/files/file_proxy_unittest.cc

Issue 238383003: Revert of Base: Make FileProxy automaticaly close the file on a worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « base/files/file_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_proxy_unittest.cc
diff --git a/base/files/file_proxy_unittest.cc b/base/files/file_proxy_unittest.cc
index 774892371709eb11d1cfdf7810c75792a97b0d52..bb7e6c31185422fa39a79383f1ebbaf7a7b5006b 100644
--- a/base/files/file_proxy_unittest.cc
+++ b/base/files/file_proxy_unittest.cc
@@ -14,7 +14,6 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread.h"
-#include "base/threading/thread_restrictions.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -144,21 +143,6 @@
EXPECT_FALSE(PathExists(test_path()));
}
-TEST_F(FileProxyTest, CreateOrOpen_AbandonedCreate) {
- bool prev = ThreadRestrictions::SetIOAllowed(false);
- {
- FileProxy proxy(file_task_runner());
- proxy.CreateOrOpen(
- test_path(),
- File::FLAG_CREATE | File::FLAG_READ,
- Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
- }
- MessageLoop::current()->Run();
- ThreadRestrictions::SetIOAllowed(prev);
-
- EXPECT_TRUE(PathExists(test_path()));
-}
-
TEST_F(FileProxyTest, Close) {
// Creates a file.
FileProxy proxy(file_task_runner());
« no previous file with comments | « base/files/file_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698