| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/pickle.h" | 6 #include "base/pickle.h" |
| 7 #include "base/thread.h" | 7 #include "base/thread.h" |
| 8 #include "base/waitable_event.h" | 8 #include "base/waitable_event.h" |
| 9 #include "net/url_request/url_request.h" | 9 #include "net/url_request/url_request.h" |
| 10 #include "net/url_request/url_request_error_job.h" | 10 #include "net/url_request/url_request_error_job.h" |
| 11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 // Create an instance and see that it looks as expected. | 395 // Create an instance and see that it looks as expected. |
| 396 | 396 |
| 397 job = new AppCacheURLRequestJob(&request, storage); | 397 job = new AppCacheURLRequestJob(&request, storage); |
| 398 EXPECT_TRUE(job->is_waiting()); | 398 EXPECT_TRUE(job->is_waiting()); |
| 399 EXPECT_FALSE(job->is_delivering_appcache_response()); | 399 EXPECT_FALSE(job->is_delivering_appcache_response()); |
| 400 EXPECT_FALSE(job->is_delivering_network_response()); | 400 EXPECT_FALSE(job->is_delivering_network_response()); |
| 401 EXPECT_FALSE(job->is_delivering_error_response()); | 401 EXPECT_FALSE(job->is_delivering_error_response()); |
| 402 EXPECT_FALSE(job->has_been_started()); | 402 EXPECT_FALSE(job->has_been_started()); |
| 403 EXPECT_FALSE(job->has_been_killed()); | 403 EXPECT_FALSE(job->has_been_killed()); |
| 404 EXPECT_EQ(GURL::EmptyGURL(), job->manifest_url()); | 404 EXPECT_EQ(GURL(), job->manifest_url()); |
| 405 EXPECT_EQ(kNoCacheId, job->cache_id()); | 405 EXPECT_EQ(kNoCacheId, job->cache_id()); |
| 406 EXPECT_FALSE(job->entry().has_response_id()); | 406 EXPECT_FALSE(job->entry().has_response_id()); |
| 407 | 407 |
| 408 TestFinished(); | 408 TestFinished(); |
| 409 } | 409 } |
| 410 | 410 |
| 411 // DeliveryOrders ----------------------------------------------------- | 411 // DeliveryOrders ----------------------------------------------------- |
| 412 void DeliveryOrders() { | 412 void DeliveryOrders() { |
| 413 AppCacheStorage* storage = service_->storage(); | 413 AppCacheStorage* storage = service_->storage(); |
| 414 URLRequest request(GURL("http://blah/"), NULL); | 414 URLRequest request(GURL("http://blah/"), NULL); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 TEST_F(AppCacheURLRequestJobTest, CancelRequest) { | 736 TEST_F(AppCacheURLRequestJobTest, CancelRequest) { |
| 737 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest); | 737 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest); |
| 738 } | 738 } |
| 739 | 739 |
| 740 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) { | 740 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) { |
| 741 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending); | 741 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending); |
| 742 } | 742 } |
| 743 | 743 |
| 744 } // namespace appcache | 744 } // namespace appcache |
| 745 | 745 |
| OLD | NEW |