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

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

Issue 8673008: base::Bind: Implement CancelableCallback to replace CancelableTaske. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test build fix. Created 9 years 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
« no previous file with comments | « webkit/appcache/appcache_group_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 AppCacheHost* host = MakeHost(1, frontend); 2481 AppCacheHost* host = MakeHost(1, frontend);
2482 host->new_master_entry_url_ = 2482 host->new_master_entry_url_ =
2483 MockHttpServer::GetMockUrl("files/explicit2"); 2483 MockHttpServer::GetMockUrl("files/explicit2");
2484 update->StartUpdate(host, host->new_master_entry_url_); 2484 update->StartUpdate(host, host->new_master_entry_url_);
2485 EXPECT_TRUE(update->pending_master_entries_.empty()); 2485 EXPECT_TRUE(update->pending_master_entries_.empty());
2486 EXPECT_FALSE(group_->queued_updates_.empty()); 2486 EXPECT_FALSE(group_->queued_updates_.empty());
2487 2487
2488 // Delete update, causing it to finish, which should trigger a new update 2488 // Delete update, causing it to finish, which should trigger a new update
2489 // for the queued host and master entry after a delay. 2489 // for the queued host and master entry after a delay.
2490 delete update; 2490 delete update;
2491 EXPECT_TRUE(group_->restart_update_task_); 2491 EXPECT_FALSE(group_->restart_update_task_.IsCancelled());
2492 2492
2493 // Set up checks for when queued update job finishes. 2493 // Set up checks for when queued update job finishes.
2494 do_checks_after_update_finished_ = true; 2494 do_checks_after_update_finished_ = true;
2495 expect_group_obsolete_ = false; 2495 expect_group_obsolete_ = false;
2496 expect_group_has_cache_ = true; 2496 expect_group_has_cache_ = true;
2497 tested_manifest_ = MANIFEST1; 2497 tested_manifest_ = MANIFEST1;
2498 expect_extra_entries_.insert(AppCache::EntryMap::value_type( 2498 expect_extra_entries_.insert(AppCache::EntryMap::value_type(
2499 host->new_master_entry_url_, AppCacheEntry(AppCacheEntry::MASTER))); 2499 host->new_master_entry_url_, AppCacheEntry(AppCacheEntry::MASTER)));
2500 MockFrontend::HostIds ids1(1, host->host_id()); 2500 MockFrontend::HostIds ids1(1, host->host_id());
2501 frontend->AddExpectedEvent(ids1, CHECKING_EVENT); 2501 frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
3459 3459
3460 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { 3460 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) {
3461 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); 3461 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest);
3462 } 3462 }
3463 3463
3464 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { 3464 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
3465 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); 3465 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest);
3466 } 3466 }
3467 3467
3468 } // namespace appcache 3468 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_group_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698