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

Unified Diff: webkit/fileapi/local_file_stream_writer_unittest.cc

Issue 11595003: webkit: Update the calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
Index: webkit/fileapi/local_file_stream_writer_unittest.cc
diff --git a/webkit/fileapi/local_file_stream_writer_unittest.cc b/webkit/fileapi/local_file_stream_writer_unittest.cc
index 2a7fa6833279bb2e3247872e3bf15b7149ea5319..3fda6d62324a2027a032bb68739a44d2eca83860 100644
--- a/webkit/fileapi/local_file_stream_writer_unittest.cc
+++ b/webkit/fileapi/local_file_stream_writer_unittest.cc
@@ -82,7 +82,7 @@ TEST_F(LocalFileStreamWriterTest, Write) {
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "bar"));
writer.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foobar", GetFileContent(path));
}
@@ -92,7 +92,7 @@ TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 2));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foxxxr", GetFileContent(path));
}
@@ -102,7 +102,7 @@ TEST_F(LocalFileStreamWriterTest, WriteEnd) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 6));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foobarxxx", GetFileContent(path));
}
@@ -113,7 +113,7 @@ TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, WriteStringToWriter(writer.get(), "foo"));
writer.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(file_util::PathExists(path));
}
@@ -135,7 +135,7 @@ TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
EXPECT_EQ(net::ERR_UNEXPECTED, cancel_result);
writer.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
// Write operation is already completed.
EXPECT_TRUE(file_util::PathExists(path));
EXPECT_EQ("foo", GetFileContent(path));
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | webkit/fileapi/local_file_system_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698