OLD | NEW |
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 // | |
5 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) | |
6 // rather than as part of test_shell_tests because they rely on being able | |
7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses | |
8 // TYPE_UI, which URLRequest doesn't allow. | |
9 // | |
10 | 4 |
11 #include <vector> | 5 #include <vector> |
12 | 6 |
13 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
15 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
16 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
17 #include "base/scoped_temp_dir.h" | 11 #include "base/scoped_temp_dir.h" |
18 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
19 #include "net/url_request/url_request.h" | 13 #include "net/url_request/url_request.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // so nothing should have happen. | 397 // so nothing should have happen. |
404 EXPECT_EQ(0, bytes_written()); | 398 EXPECT_EQ(0, bytes_written()); |
405 EXPECT_EQ(base::PLATFORM_FILE_ERROR_ABORT, status()); | 399 EXPECT_EQ(base::PLATFORM_FILE_ERROR_ABORT, status()); |
406 EXPECT_EQ(base::PLATFORM_FILE_OK, cancel_status()); | 400 EXPECT_EQ(base::PLATFORM_FILE_OK, cancel_status()); |
407 EXPECT_TRUE(complete()); | 401 EXPECT_TRUE(complete()); |
408 } | 402 } |
409 | 403 |
410 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. | 404 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. |
411 | 405 |
412 } // namespace fileapi | 406 } // namespace fileapi |
OLD | NEW |