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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // so nothing should have happen. | 381 // so nothing should have happen. |
388 EXPECT_EQ(0, bytes_written()); | 382 EXPECT_EQ(0, bytes_written()); |
389 EXPECT_EQ(base::PLATFORM_FILE_ERROR_ABORT, status()); | 383 EXPECT_EQ(base::PLATFORM_FILE_ERROR_ABORT, status()); |
390 EXPECT_EQ(base::PLATFORM_FILE_OK, cancel_status()); | 384 EXPECT_EQ(base::PLATFORM_FILE_OK, cancel_status()); |
391 EXPECT_TRUE(complete()); | 385 EXPECT_TRUE(complete()); |
392 } | 386 } |
393 | 387 |
394 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. | 388 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. |
395 | 389 |
396 } // namespace fileapi | 390 } // namespace fileapi |
OLD | NEW |