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

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

Issue 9572037: Convert uses of int ms to TimeDelta in webkit/appcache and webkit/dom_storage. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_task_runner.cc » ('j') | 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 <stack> 5 #include <stack>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 reader_.reset(service_->storage()->CreateResponseReader( 637 reader_.reset(service_->storage()->CreateResponseReader(
638 GURL(), 0, written_response_id_)); 638 GURL(), 0, written_response_id_));
639 ReadResponseBody(new IOBuffer(kBlockSize), kBlockSize); 639 ReadResponseBody(new IOBuffer(kBlockSize), kBlockSize);
640 EXPECT_TRUE(reader_->IsReadPending()); 640 EXPECT_TRUE(reader_->IsReadPending());
641 reader_.reset(); 641 reader_.reset();
642 642
643 // Wait a moment to verify no callbacks. 643 // Wait a moment to verify no callbacks.
644 MessageLoop::current()->PostDelayedTask( 644 MessageLoop::current()->PostDelayedTask(
645 FROM_HERE, base::Bind(&AppCacheResponseTest::VerifyNoCallbacks, 645 FROM_HERE, base::Bind(&AppCacheResponseTest::VerifyNoCallbacks,
646 base::Unretained(this)), 646 base::Unretained(this)),
647 10); 647 base::TimeDelta::FromMilliseconds(10));
648 } 648 }
649 649
650 void VerifyNoCallbacks() { 650 void VerifyNoCallbacks() {
651 EXPECT_TRUE(!write_callback_was_called_); 651 EXPECT_TRUE(!write_callback_was_called_);
652 EXPECT_TRUE(!read_callback_was_called_); 652 EXPECT_TRUE(!read_callback_was_called_);
653 TestFinished(); 653 TestFinished();
654 } 654 }
655 655
656 // Data members 656 // Data members
657 657
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { 710 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) {
711 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); 711 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks);
712 } 712 }
713 713
714 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { 714 TEST_F(AppCacheResponseTest, DeleteWithIOPending) {
715 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); 715 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending);
716 } 716 }
717 717
718 } // namespace appcache 718 } // namespace appcache
OLDNEW
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698