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

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

Issue 10540042: Move remaining webkit storage unit tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "webkit/appcache/appcache.h" 7 #include "webkit/appcache/appcache.h"
8 #include "webkit/appcache/appcache_group.h" 8 #include "webkit/appcache/appcache_group.h"
9 #include "webkit/appcache/appcache_response.h" 9 #include "webkit/appcache/appcache_response.h"
10 #include "webkit/appcache/appcache_storage.h" 10 #include "webkit/appcache/appcache_storage.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool stored_group_success_; 64 bool stored_group_success_;
65 scoped_refptr<AppCacheGroup> obsoleted_group_; 65 scoped_refptr<AppCacheGroup> obsoleted_group_;
66 bool obsoleted_success_; 66 bool obsoleted_success_;
67 GURL found_url_; 67 GURL found_url_;
68 AppCacheEntry found_entry_; 68 AppCacheEntry found_entry_;
69 GURL found_fallback_url_; 69 GURL found_fallback_url_;
70 AppCacheEntry found_fallback_entry_; 70 AppCacheEntry found_fallback_entry_;
71 int64 found_cache_id_; 71 int64 found_cache_id_;
72 GURL found_manifest_url_; 72 GURL found_manifest_url_;
73 }; 73 };
74
75 private:
76 MessageLoop message_loop_;
74 }; 77 };
75 78
76 79
77 TEST_F(MockAppCacheStorageTest, LoadCache_Miss) { 80 TEST_F(MockAppCacheStorageTest, LoadCache_Miss) {
78 // Attempt to load a cache that doesn't exist. Should 81 // Attempt to load a cache that doesn't exist. Should
79 // complete asyncly. 82 // complete asyncly.
80 MockAppCacheService service; 83 MockAppCacheService service;
81 MockStorageDelegate delegate; 84 MockStorageDelegate delegate;
82 service.storage()->LoadCache(111, &delegate); 85 service.storage()->LoadCache(111, &delegate);
83 EXPECT_NE(111, delegate.loaded_cache_id_); 86 EXPECT_NE(111, delegate.loaded_cache_id_);
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 EXPECT_TRUE(delegate.found_manifest_url_.is_empty()); 615 EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
613 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_); 616 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
614 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id()); 617 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id());
615 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id()); 618 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id());
616 EXPECT_TRUE(delegate.found_fallback_url_.is_empty()); 619 EXPECT_TRUE(delegate.found_fallback_url_.is_empty());
617 EXPECT_EQ(0, delegate.found_entry_.types()); 620 EXPECT_EQ(0, delegate.found_entry_.types());
618 EXPECT_EQ(0, delegate.found_fallback_entry_.types()); 621 EXPECT_EQ(0, delegate.found_fallback_entry_.types());
619 } 622 }
620 623
621 } // namespace appcache 624 } // namespace appcache
622
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/blob/shareable_file_reference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698