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

Side by Side Diff: webkit/appcache/appcache_update_job_unittest.cc

Issue 3033003: Make conditional requests when updating the appcache.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 (c) 2010 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "base/thread.h" 8 #include "base/thread.h"
9 #include "base/waitable_event.h" 9 #include "base/waitable_event.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 (*body) = "explicit2"; 98 (*body) = "explicit2";
99 } else if (path == "/files/fallback1a") { 99 } else if (path == "/files/fallback1a") {
100 (*headers) = std::string(ok_headers, arraysize(ok_headers)); 100 (*headers) = std::string(ok_headers, arraysize(ok_headers));
101 (*body) = "fallback1a"; 101 (*body) = "fallback1a";
102 } else if (path == "/files/gone") { 102 } else if (path == "/files/gone") {
103 (*headers) = std::string(gone_headers, arraysize(gone_headers)); 103 (*headers) = std::string(gone_headers, arraysize(gone_headers));
104 (*body) = ""; 104 (*body) = "";
105 } else if (path == "/files/manifest1") { 105 } else if (path == "/files/manifest1") {
106 (*headers) = std::string(manifest_headers, arraysize(manifest_headers)); 106 (*headers) = std::string(manifest_headers, arraysize(manifest_headers));
107 (*body) = kManifest1Contents; 107 (*body) = kManifest1Contents;
108 } else if (path == "/files/manifest1-with-notmodified") {
109 (*headers) = std::string(manifest_headers, arraysize(manifest_headers));
110 (*body) = kManifest1Contents;
111 (*body).append("CACHE:\n"
112 "notmodified\n");
108 } else if (path == "/files/manifest-fb-404") { 113 } else if (path == "/files/manifest-fb-404") {
109 (*headers) = std::string(manifest_headers, arraysize(manifest_headers)); 114 (*headers) = std::string(manifest_headers, arraysize(manifest_headers));
110 (*body) = "CACHE MANIFEST\n" 115 (*body) = "CACHE MANIFEST\n"
111 "explicit1\n" 116 "explicit1\n"
112 "FALLBACK:\n" 117 "FALLBACK:\n"
113 "fallback1 fallback1a\n" 118 "fallback1 fallback1a\n"
114 "fallback404 fallback-404\n" 119 "fallback404 fallback-404\n"
115 "NETWORK:\n" 120 "NETWORK:\n"
116 "online1\n"; 121 "online1\n";
117 } else if (path == "/files/manifest-merged-types") { 122 } else if (path == "/files/manifest-merged-types") {
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 527
523 528
524 AppCacheUpdateJobTest() 529 AppCacheUpdateJobTest()
525 : do_checks_after_update_finished_(false), 530 : do_checks_after_update_finished_(false),
526 expect_group_obsolete_(false), 531 expect_group_obsolete_(false),
527 expect_group_has_cache_(false), 532 expect_group_has_cache_(false),
528 expect_old_cache_(NULL), 533 expect_old_cache_(NULL),
529 expect_newest_cache_(NULL), 534 expect_newest_cache_(NULL),
530 expect_non_null_update_time_(false), 535 expect_non_null_update_time_(false),
531 tested_manifest_(NONE), 536 tested_manifest_(NONE),
537 tested_manifest1_path_override_(NULL),
532 registered_factory_(false), 538 registered_factory_(false),
533 old_factory_(NULL) { 539 old_factory_(NULL) {
534 } 540 }
535 541
536 static void SetUpTestCase() { 542 static void SetUpTestCase() {
537 io_thread_ = new IOThread("AppCacheUpdateJob IO test thread"); 543 io_thread_ = new IOThread("AppCacheUpdateJob IO test thread");
538 base::Thread::Options options(MessageLoop::TYPE_IO, 0); 544 base::Thread::Options options(MessageLoop::TYPE_IO, 0);
539 io_thread_->StartWithOptions(options); 545 io_thread_->StartWithOptions(options);
540 } 546 }
541 547
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 frontend2->AddExpectedEvent(ids2, CHECKING_EVENT); 1395 frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
1390 frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT); 1396 frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
1391 frontend2->AddExpectedEvent(ids2, ERROR_EVENT); 1397 frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
1392 1398
1393 WaitForUpdateToFinish(); 1399 WaitForUpdateToFinish();
1394 } 1400 }
1395 1401
1396 void UpgradeFailMasterUrlFetchTest() { 1402 void UpgradeFailMasterUrlFetchTest() {
1397 ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()); 1403 ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
1398 1404
1405 tested_manifest1_path_override_ = "files/manifest1-with-notmodified";
1406
1399 MakeService(); 1407 MakeService();
1408 const GURL kManifestUrl =
1409 MockHttpServer::GetMockUrl(tested_manifest1_path_override_);
1400 group_ = new AppCacheGroup( 1410 group_ = new AppCacheGroup(
1401 service_.get(), MockHttpServer::GetMockUrl("files/manifest1"), 1411 service_.get(), kManifestUrl,
1402 service_->storage()->NewGroupId()); 1412 service_->storage()->NewGroupId());
1403 AppCacheUpdateJob* update = new AppCacheUpdateJob(service_.get(), group_); 1413 AppCacheUpdateJob* update = new AppCacheUpdateJob(service_.get(), group_);
1404 group_->update_job_ = update; 1414 group_->update_job_ = update;
1405 1415
1406 AppCache* cache = MakeCacheForGroup(service_->storage()->NewCacheId(), 25); 1416 AppCache* cache = MakeCacheForGroup(service_->storage()->NewCacheId(), 25);
1407 MockFrontend* frontend1 = MakeMockFrontend(); 1417 MockFrontend* frontend1 = MakeMockFrontend();
1408 MockFrontend* frontend2 = MakeMockFrontend(); 1418 MockFrontend* frontend2 = MakeMockFrontend();
1409 AppCacheHost* host1 = MakeHost(1, frontend1); 1419 AppCacheHost* host1 = MakeHost(1, frontend1);
1410 AppCacheHost* host2 = MakeHost(2, frontend2); 1420 AppCacheHost* host2 = MakeHost(2, frontend2);
1411 host1->AssociateCache(cache); 1421 host1->AssociateCache(cache);
1412 host2->AssociateCache(cache); 1422 host2->AssociateCache(cache);
1413 1423
1414 // Give the newest cache some master entries; one will fail with a 404. 1424 // Give the newest cache some existing entries; one will fail with a 404.
1415 cache->AddEntry( 1425 cache->AddEntry(
1416 MockHttpServer::GetMockUrl("files/notfound"), 1426 MockHttpServer::GetMockUrl("files/notfound"),
1417 AppCacheEntry(AppCacheEntry::MASTER, 222)); 1427 AppCacheEntry(AppCacheEntry::MASTER, 222));
1418 cache->AddEntry( 1428 cache->AddEntry(
1419 MockHttpServer::GetMockUrl("files/explicit2"), 1429 MockHttpServer::GetMockUrl("files/explicit2"),
1420 AppCacheEntry(AppCacheEntry::MASTER | AppCacheEntry::FOREIGN, 333)); 1430 AppCacheEntry(AppCacheEntry::MASTER | AppCacheEntry::FOREIGN, 333));
1421 cache->AddEntry( 1431 cache->AddEntry(
1422 MockHttpServer::GetMockUrl("files/servererror"), 1432 MockHttpServer::GetMockUrl("files/servererror"),
1423 AppCacheEntry(AppCacheEntry::MASTER, 444)); 1433 AppCacheEntry(AppCacheEntry::MASTER, 444));
1434 cache->AddEntry(
1435 MockHttpServer::GetMockUrl("files/notmodified"),
1436 AppCacheEntry(AppCacheEntry::EXPLICIT, 555));
1437
1438 // Seed the response_info working set with canned data for
1439 // files/servererror and for files/notmodified to test that the
1440 // existing entries for those resource are reused by the update job.
1441 const char kData[] =
1442 "HTTP/1.1 200 OK\0"
1443 "Last-Modified: Sat, 29 Oct 1994 19:43:31 GMT\0"
1444 "\0";
1445 const std::string kRawHeaders(kData, arraysize(kData));
1446 MakeAppCacheResponseInfo(kManifestUrl, 444, kRawHeaders);
1447 MakeAppCacheResponseInfo(kManifestUrl, 555, kRawHeaders);
1424 1448
1425 update->StartUpdate(NULL, GURL()); 1449 update->StartUpdate(NULL, GURL());
1426 EXPECT_TRUE(update->manifest_url_request_ != NULL); 1450 EXPECT_TRUE(update->manifest_url_request_ != NULL);
1427 1451
1428 // Set up checks for when update job finishes. 1452 // Set up checks for when update job finishes.
1429 do_checks_after_update_finished_ = true; 1453 do_checks_after_update_finished_ = true;
1430 expect_group_obsolete_ = false; 1454 expect_group_obsolete_ = false;
1431 expect_group_has_cache_ = true; 1455 expect_group_has_cache_ = true;
1432 expect_old_cache_ = cache; 1456 expect_old_cache_ = cache;
1433 tested_manifest_ = MANIFEST1; 1457 tested_manifest_ = MANIFEST1;
1434 expect_extra_entries_.insert(AppCache::EntryMap::value_type( 1458 expect_extra_entries_.insert(AppCache::EntryMap::value_type(
1435 MockHttpServer::GetMockUrl("files/explicit2"), 1459 MockHttpServer::GetMockUrl("files/explicit2"),
1436 AppCacheEntry(AppCacheEntry::MASTER))); // foreign flag is dropped 1460 AppCacheEntry(AppCacheEntry::MASTER))); // foreign flag is dropped
1437 expect_extra_entries_.insert(AppCache::EntryMap::value_type( 1461 expect_extra_entries_.insert(AppCache::EntryMap::value_type(
1438 MockHttpServer::GetMockUrl("files/servererror"), 1462 MockHttpServer::GetMockUrl("files/servererror"),
1439 AppCacheEntry(AppCacheEntry::MASTER))); 1463 AppCacheEntry(AppCacheEntry::MASTER)));
1464 expect_extra_entries_.insert(AppCache::EntryMap::value_type(
1465 MockHttpServer::GetMockUrl("files/notmodified"),
1466 AppCacheEntry(AppCacheEntry::EXPLICIT)));
1440 expect_response_ids_.insert(std::map<GURL, int64>::value_type( 1467 expect_response_ids_.insert(std::map<GURL, int64>::value_type(
1441 MockHttpServer::GetMockUrl("files/servererror"), 444)); // copied 1468 MockHttpServer::GetMockUrl("files/servererror"), 444)); // copied
1469 expect_response_ids_.insert(std::map<GURL, int64>::value_type(
1470 MockHttpServer::GetMockUrl("files/notmodified"), 555)); // copied
1442 MockFrontend::HostIds ids1(1, host1->host_id()); 1471 MockFrontend::HostIds ids1(1, host1->host_id());
1443 frontend1->AddExpectedEvent(ids1, CHECKING_EVENT); 1472 frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
1444 frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT); 1473 frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
1445 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit1 1474 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit1
1446 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // fallback1a 1475 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // fallback1a
1447 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // notfound 1476 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // notfound
1448 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit2 1477 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit2
1449 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // servererror 1478 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // servererror
1479 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // notmodified
1450 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final 1480 frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
1451 frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT); 1481 frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
1452 MockFrontend::HostIds ids2(1, host2->host_id()); 1482 MockFrontend::HostIds ids2(1, host2->host_id());
1453 frontend2->AddExpectedEvent(ids2, CHECKING_EVENT); 1483 frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
1454 frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT); 1484 frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
1455 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit1 1485 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit1
1456 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // fallback1a 1486 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // fallback1a
1457 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // notfound 1487 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // notfound
1458 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit2 1488 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit2
1459 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // servererror 1489 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // servererror
1490 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // notmodified
1460 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final 1491 frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
1461 frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT); 1492 frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
1462 1493
1463 WaitForUpdateToFinish(); 1494 WaitForUpdateToFinish();
1464 } 1495 }
1465 1496
1466 void EmptyManifestTest() { 1497 void EmptyManifestTest() {
1467 ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()); 1498 ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
1468 1499
1469 MakeService(); 1500 MakeService();
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 EXPECT_EQ(AppCacheGroup::IDLE, group_->update_status()); 2797 EXPECT_EQ(AppCacheGroup::IDLE, group_->update_status());
2767 EXPECT_TRUE(group_->update_job() == NULL); 2798 EXPECT_TRUE(group_->update_job() == NULL);
2768 if (do_checks_after_update_finished_) 2799 if (do_checks_after_update_finished_)
2769 VerifyExpectations(); 2800 VerifyExpectations();
2770 2801
2771 // Clean up everything that was created on the IO thread. 2802 // Clean up everything that was created on the IO thread.
2772 protect_newest_cache_ = NULL; 2803 protect_newest_cache_ = NULL;
2773 group_ = NULL; 2804 group_ = NULL;
2774 STLDeleteContainerPointers(hosts_.begin(), hosts_.end()); 2805 STLDeleteContainerPointers(hosts_.begin(), hosts_.end());
2775 STLDeleteContainerPointers(frontends_.begin(), frontends_.end()); 2806 STLDeleteContainerPointers(frontends_.begin(), frontends_.end());
2807 response_infos_.clear();
2776 service_.reset(NULL); 2808 service_.reset(NULL);
2777 if (registered_factory_) 2809 if (registered_factory_)
2778 URLRequest::RegisterProtocolFactory("http", old_factory_); 2810 URLRequest::RegisterProtocolFactory("http", old_factory_);
2779 2811
2780 event_->Signal(); 2812 event_->Signal();
2781 } 2813 }
2782 2814
2783 void MakeService() { 2815 void MakeService() {
2784 service_.reset(new MockAppCacheService()); 2816 service_.reset(new MockAppCacheService());
2785 service_->set_request_context(io_thread_->request_context()); 2817 service_->set_request_context(io_thread_->request_context());
(...skipping 12 matching lines...) Expand all
2798 2830
2799 return cache; 2831 return cache;
2800 } 2832 }
2801 2833
2802 AppCacheHost* MakeHost(int host_id, AppCacheFrontend* frontend) { 2834 AppCacheHost* MakeHost(int host_id, AppCacheFrontend* frontend) {
2803 AppCacheHost* host = new AppCacheHost(host_id, frontend, service_.get()); 2835 AppCacheHost* host = new AppCacheHost(host_id, frontend, service_.get());
2804 hosts_.push_back(host); 2836 hosts_.push_back(host);
2805 return host; 2837 return host;
2806 } 2838 }
2807 2839
2840 AppCacheResponseInfo* MakeAppCacheResponseInfo(
2841 const GURL& manifest_url, int64 response_id,
2842 const std::string& raw_headers) {
2843 net::HttpResponseInfo* http_info = new net::HttpResponseInfo();
2844 http_info->headers = new net::HttpResponseHeaders(raw_headers);
2845 scoped_refptr<AppCacheResponseInfo> info =
2846 new AppCacheResponseInfo(service_.get(), manifest_url,
2847 response_id, http_info, 0);
2848 response_infos_.push_back(info);
2849 return info;
2850 }
2851
2808 MockFrontend* MakeMockFrontend() { 2852 MockFrontend* MakeMockFrontend() {
2809 MockFrontend* frontend = new MockFrontend(); 2853 MockFrontend* frontend = new MockFrontend();
2810 frontends_.push_back(frontend); 2854 frontends_.push_back(frontend);
2811 return frontend; 2855 return frontend;
2812 } 2856 }
2813 2857
2814 // Verifies conditions about the group and notifications after an update 2858 // Verifies conditions about the group and notifications after an update
2815 // has finished. Cannot verify update job internals as update is deleted. 2859 // has finished. Cannot verify update job internals as update is deleted.
2816 void VerifyExpectations() { 2860 void VerifyExpectations() {
2817 RetryRequestTestJob::Verify(); 2861 RetryRequestTestJob::Verify();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 case NONE: 2966 case NONE:
2923 default: 2967 default:
2924 break; 2968 break;
2925 } 2969 }
2926 } 2970 }
2927 } 2971 }
2928 2972
2929 void VerifyManifest1(AppCache* cache) { 2973 void VerifyManifest1(AppCache* cache) {
2930 size_t expected = 3 + expect_extra_entries_.size(); 2974 size_t expected = 3 + expect_extra_entries_.size();
2931 EXPECT_EQ(expected, cache->entries().size()); 2975 EXPECT_EQ(expected, cache->entries().size());
2976 const char* kManifestPath = tested_manifest1_path_override_ ?
2977 tested_manifest1_path_override_ :
2978 "files/manifest1";
2932 AppCacheEntry* entry = 2979 AppCacheEntry* entry =
2933 cache->GetEntry(MockHttpServer::GetMockUrl("files/manifest1")); 2980 cache->GetEntry(MockHttpServer::GetMockUrl(kManifestPath));
2934 ASSERT_TRUE(entry); 2981 ASSERT_TRUE(entry);
2935 EXPECT_EQ(AppCacheEntry::MANIFEST, entry->types()); 2982 EXPECT_EQ(AppCacheEntry::MANIFEST, entry->types());
2936 entry = cache->GetEntry(MockHttpServer::GetMockUrl("files/explicit1")); 2983 entry = cache->GetEntry(MockHttpServer::GetMockUrl("files/explicit1"));
2937 ASSERT_TRUE(entry); 2984 ASSERT_TRUE(entry);
2938 EXPECT_TRUE(entry->IsExplicit()); 2985 EXPECT_TRUE(entry->IsExplicit());
2939 entry = cache->GetEntry( 2986 entry = cache->GetEntry(
2940 MockHttpServer::GetMockUrl("files/fallback1a")); 2987 MockHttpServer::GetMockUrl("files/fallback1a"));
2941 ASSERT_TRUE(entry); 2988 ASSERT_TRUE(entry);
2942 EXPECT_EQ(AppCacheEntry::FALLBACK, entry->types()); 2989 EXPECT_EQ(AppCacheEntry::FALLBACK, entry->types());
2943 2990
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 MockAppCachePolicy policy_; 3123 MockAppCachePolicy policy_;
3077 3124
3078 scoped_ptr<AppCacheResponseWriter> response_writer_; 3125 scoped_ptr<AppCacheResponseWriter> response_writer_;
3079 scoped_ptr<net::CompletionCallbackImpl<AppCacheUpdateJobTest> > 3126 scoped_ptr<net::CompletionCallbackImpl<AppCacheUpdateJobTest> >
3080 write_callback_; 3127 write_callback_;
3081 3128
3082 // Hosts used by an async test that need to live until update job finishes. 3129 // Hosts used by an async test that need to live until update job finishes.
3083 // Otherwise, test can put host on the stack instead of here. 3130 // Otherwise, test can put host on the stack instead of here.
3084 std::vector<AppCacheHost*> hosts_; 3131 std::vector<AppCacheHost*> hosts_;
3085 3132
3133 // Response infos used by an async test that need to live until update job
3134 // finishes.
3135 std::vector<scoped_refptr<AppCacheResponseInfo> > response_infos_;
3136
3086 // Flag indicating if test cares to verify the update after update finishes. 3137 // Flag indicating if test cares to verify the update after update finishes.
3087 bool do_checks_after_update_finished_; 3138 bool do_checks_after_update_finished_;
3088 bool expect_group_obsolete_; 3139 bool expect_group_obsolete_;
3089 bool expect_group_has_cache_; 3140 bool expect_group_has_cache_;
3090 AppCache* expect_old_cache_; 3141 AppCache* expect_old_cache_;
3091 AppCache* expect_newest_cache_; 3142 AppCache* expect_newest_cache_;
3092 bool expect_non_null_update_time_; 3143 bool expect_non_null_update_time_;
3093 std::vector<MockFrontend*> frontends_; // to check expected events 3144 std::vector<MockFrontend*> frontends_; // to check expected events
3094 TestedManifest tested_manifest_; 3145 TestedManifest tested_manifest_;
3146 const char* tested_manifest1_path_override_;
3095 AppCache::EntryMap expect_extra_entries_; 3147 AppCache::EntryMap expect_extra_entries_;
3096 std::map<GURL, int64> expect_response_ids_; 3148 std::map<GURL, int64> expect_response_ids_;
3097 3149
3098 bool registered_factory_; 3150 bool registered_factory_;
3099 URLRequest::ProtocolFactory* old_factory_; 3151 URLRequest::ProtocolFactory* old_factory_;
3100 }; 3152 };
3101 3153
3102 // static 3154 // static
3103 IOThread* AppCacheUpdateJobTest::io_thread_ = NULL; 3155 IOThread* AppCacheUpdateJobTest::io_thread_ = NULL;
3104 base::WaitableEvent* AppCacheUpdateJobTest::io_thread_shutdown_event_ = NULL; 3156 base::WaitableEvent* AppCacheUpdateJobTest::io_thread_shutdown_event_ = NULL;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest); 3423 RunTestOnIOThread(&AppCacheUpdateJobTest::MultipleHeadersRefetchTest);
3372 } 3424 }
3373 3425
3374 } // namespace appcache 3426 } // namespace appcache
3375 3427
3376 // AppCacheUpdateJobTest is expected to always live longer than the 3428 // AppCacheUpdateJobTest is expected to always live longer than the
3377 // runnable methods. This lets us call NewRunnableMethod on its instances. 3429 // runnable methods. This lets us call NewRunnableMethod on its instances.
3378 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest); 3430 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest);
3379 DISABLE_RUNNABLE_METHOD_REFCOUNT( 3431 DISABLE_RUNNABLE_METHOD_REFCOUNT(
3380 appcache::AppCacheUpdateJobTest::MockAppCachePolicy); 3432 appcache::AppCacheUpdateJobTest::MockAppCachePolicy);
OLDNEW
« webkit/appcache/appcache_update_job.cc ('K') | « webkit/appcache/appcache_update_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698