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

Unified Diff: webkit/appcache/appcache_update_job_unittest.cc

Issue 8396013: AppCache INTERCEPT namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
Index: webkit/appcache/appcache_update_job_unittest.cc
===================================================================
--- webkit/appcache/appcache_update_job_unittest.cc (revision 113279)
+++ webkit/appcache/appcache_update_job_unittest.cc (working copy)
@@ -191,6 +191,12 @@
}
};
+inline bool operator==(const Namespace& lhs, const Namespace& rhs) {
+ return lhs.type == rhs.type &&
+ lhs.namespace_url == rhs.namespace_url &&
+ lhs.target_url == rhs.target_url;
+}
+
} // namespace
class MockFrontend : public AppCacheFrontend {
@@ -3043,13 +3049,12 @@
}
expected = 1;
- EXPECT_EQ(expected, cache->fallback_namespaces_.size());
- EXPECT_TRUE(cache->fallback_namespaces_.end() !=
- std::find(cache->fallback_namespaces_.begin(),
- cache->fallback_namespaces_.end(),
- FallbackNamespace(
- MockHttpServer::GetMockUrl("files/fallback1"),
- MockHttpServer::GetMockUrl("files/fallback1a"))));
+ ASSERT_EQ(expected, cache->fallback_namespaces_.size());
+ EXPECT_TRUE(cache->fallback_namespaces_[0] ==
+ Namespace(
+ FALLBACK_NAMESPACE,
+ MockHttpServer::GetMockUrl("files/fallback1"),
+ MockHttpServer::GetMockUrl("files/fallback1a")));
EXPECT_TRUE(cache->online_whitelist_namespaces_.empty());
EXPECT_TRUE(cache->online_whitelist_all_);
@@ -3071,13 +3076,12 @@
AppCacheEntry::MASTER, entry->types());
expected = 1;
- EXPECT_EQ(expected, cache->fallback_namespaces_.size());
- EXPECT_TRUE(cache->fallback_namespaces_.end() !=
- std::find(cache->fallback_namespaces_.begin(),
- cache->fallback_namespaces_.end(),
- FallbackNamespace(
- MockHttpServer::GetMockUrl("files/fallback1"),
- MockHttpServer::GetMockUrl("files/explicit1"))));
+ ASSERT_EQ(expected, cache->fallback_namespaces_.size());
+ EXPECT_TRUE(cache->fallback_namespaces_[0] ==
+ Namespace(
+ FALLBACK_NAMESPACE,
+ MockHttpServer::GetMockUrl("files/fallback1"),
+ MockHttpServer::GetMockUrl("files/explicit1")));
EXPECT_EQ(expected, cache->online_whitelist_namespaces_.size());
EXPECT_TRUE(cache->online_whitelist_namespaces_.end() !=

Powered by Google App Engine
This is Rietveld 408576698