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

Side by Side Diff: webkit/fileapi/local_file_stream_writer_unittest.cc

Issue 10447043: Move all webkit/fileapi tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to fix ChromeOS build Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // NOTE: These tests are run as part of "unit_tests" (in chrome/test) rather
6 // than as part of test_shell_tests because they rely on being able to
7 // instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses TYPE_UI,
8 // which net::TestCompletionCallback doesn't allow.
9
10 #include "webkit/fileapi/local_file_stream_writer.h" 5 #include "webkit/fileapi/local_file_stream_writer.h"
11 6
12 #include <string> 7 #include <string>
13 8
14 #include "base/callback.h" 9 #include "base/callback.h"
15 #include "base/file_util.h" 10 #include "base/file_util.h"
16 #include "base/logging.h" 11 #include "base/logging.h"
17 #include "base/message_loop.h" 12 #include "base/message_loop.h"
18 #include "base/scoped_temp_dir.h" 13 #include "base/scoped_temp_dir.h"
19 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 147
153 scoped_refptr<net::StringIOBuffer> buffer(new net::StringIOBuffer("xxx")); 148 scoped_refptr<net::StringIOBuffer> buffer(new net::StringIOBuffer("xxx"));
154 int result = writer->Write(buffer, buffer->size(), base::Bind(&NeverCalled)); 149 int result = writer->Write(buffer, buffer->size(), base::Bind(&NeverCalled));
155 ASSERT_EQ(net::ERR_IO_PENDING, result); 150 ASSERT_EQ(net::ERR_IO_PENDING, result);
156 151
157 net::TestCompletionCallback callback; 152 net::TestCompletionCallback callback;
158 writer->Cancel(callback.callback()); 153 writer->Cancel(callback.callback());
159 int cancel_result = callback.WaitForResult(); 154 int cancel_result = callback.WaitForResult();
160 EXPECT_EQ(net::OK, cancel_result); 155 EXPECT_EQ(net::OK, cancel_result);
161 } 156 }
OLDNEW
« no previous file with comments | « webkit/fileapi/isolated_file_util_unittest.cc ('k') | webkit/fileapi/local_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698