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

Side by Side Diff: content/browser/fileapi/file_system_operation_runner_unittest.cc

Issue 23440033: Move FileAPI test code from webkit to content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/public/test/test_file_system_context.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/browser/fileapi/file_system_context.h" 12 #include "webkit/browser/fileapi/file_system_context.h"
12 #include "webkit/browser/fileapi/file_system_operation_runner.h" 13 #include "webkit/browser/fileapi/file_system_operation_runner.h"
13 #include "webkit/browser/fileapi/mock_file_system_context.h"
14 14
15 namespace fileapi { 15 namespace fileapi {
16 16
17 void GetStatus(bool* done, 17 void GetStatus(bool* done,
18 base::PlatformFileError *status_out, 18 base::PlatformFileError *status_out,
19 base::PlatformFileError status) { 19 base::PlatformFileError status) {
20 ASSERT_FALSE(*done); 20 ASSERT_FALSE(*done);
21 *done = true; 21 *done = true;
22 *status_out = status; 22 *status_out = status;
23 } 23 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 base::PlatformFileError cancel_status = base::PLATFORM_FILE_ERROR_FAILED; 153 base::PlatformFileError cancel_status = base::PLATFORM_FILE_ERROR_FAILED;
154 operation_runner()->Cancel(kInvalidId, base::Bind(&GetCancelStatus, 154 operation_runner()->Cancel(kInvalidId, base::Bind(&GetCancelStatus,
155 &done, &cancel_done, 155 &done, &cancel_done,
156 &cancel_status)); 156 &cancel_status));
157 157
158 ASSERT_TRUE(cancel_done); 158 ASSERT_TRUE(cancel_done);
159 ASSERT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, cancel_status); 159 ASSERT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, cancel_status);
160 } 160 }
161 161
162 } // namespace fileapi 162 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698