| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stack> | 5 #include <stack> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 job_ = handler_->MaybeLoadFallbackForResponse(request_.get()); | 355 job_ = handler_->MaybeLoadFallbackForResponse(request_.get()); |
| 356 EXPECT_TRUE(job_); | 356 EXPECT_TRUE(job_); |
| 357 EXPECT_TRUE(job_->is_delivering_appcache_response()); | 357 EXPECT_TRUE(job_->is_delivering_appcache_response()); |
| 358 | 358 |
| 359 int64 cache_id = kNoCacheId; | 359 int64 cache_id = kNoCacheId; |
| 360 GURL manifest_url; | 360 GURL manifest_url; |
| 361 handler_->GetExtraResponseInfo(&cache_id, &manifest_url); | 361 handler_->GetExtraResponseInfo(&cache_id, &manifest_url); |
| 362 EXPECT_EQ(1, cache_id); | 362 EXPECT_EQ(1, cache_id); |
| 363 EXPECT_EQ(GURL("http://blah/manifest/"), manifest_url); | 363 EXPECT_EQ(GURL("http://blah/manifest/"), manifest_url); |
| 364 EXPECT_TRUE(host_->main_resource_was_fallback_); | 364 EXPECT_TRUE(host_->main_resource_was_namespace_entry_); |
| 365 EXPECT_EQ(GURL("http://blah/fallbackurl"), host_->fallback_url_); | 365 EXPECT_EQ(GURL("http://blah/fallbackurl"), host_->namespace_entry_url_); |
| 366 | 366 |
| 367 EXPECT_EQ(GURL("http://blah/manifest/"), | 367 EXPECT_EQ(GURL("http://blah/manifest/"), |
| 368 host_->preferred_manifest_url()); | 368 host_->preferred_manifest_url()); |
| 369 | 369 |
| 370 TestFinished(); | 370 TestFinished(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 // MainResource_FallbackOverride -------------------------------------------- | 373 // MainResource_FallbackOverride -------------------------------------------- |
| 374 | 374 |
| 375 void MainResource_FallbackOverride() { | 375 void MainResource_FallbackOverride() { |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 889 |
| 890 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { | 890 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { |
| 891 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); | 891 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); |
| 892 } | 892 } |
| 893 | 893 |
| 894 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { | 894 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { |
| 895 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); | 895 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace appcache | 898 } // namespace appcache |
| OLD | NEW |