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

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, 1 month 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 112534)
+++ webkit/appcache/appcache_update_job_unittest.cc (working copy)
@@ -191,6 +191,13 @@
}
};
+
jennb 2011/12/05 23:23:07 Extra blank line?
michaeln 2011/12/06 19:41:24 Done.
+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 +3050,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] ==
jennb 2011/12/05 23:23:07 Change to EXPECT_EQ?
michaeln 2011/12/06 19:41:24 for some reason EXPECT_EQ doesn't figure out the =
+ 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 +3077,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] ==
jennb 2011/12/05 23:23:07 Ditto.
+ 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