diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-03 02:29:14 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-03 02:29:14 +0000 |
commit | 6ed2a5a54b7bb8ccd33da7bc948fee169f128459 (patch) | |
tree | 3752c15899760eef346dc2c1f66768aa2f3e676a /webkit/appcache/appcache_storage_impl_unittest.cc | |
parent | d6bb669008e0308f3ee6e04e77fe903698864e7b (diff) | |
download | chromium_src-6ed2a5a54b7bb8ccd33da7bc948fee169f128459.zip chromium_src-6ed2a5a54b7bb8ccd33da7bc948fee169f128459.tar.gz chromium_src-6ed2a5a54b7bb8ccd33da7bc948fee169f128459.tar.bz2 |
Fix for WKBug 47000: a failure mode given bad content (in an unlikely form). The error occurs when an html page is put in an appcache as a fallback resource (so it's listed in a fallback section), but it contains a manifest attribute that refers to a different manifest file. The system should mark the resource as foreign and exclude it from main resource loads, but it was failing to do so. The fix is to do that.
BUG=WK47000
TEST=http/tests/appcache/foreign-fallback.html
Review URL: http://codereview.chromium.org/3529009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage_impl_unittest.cc')
-rw-r--r-- | webkit/appcache/appcache_storage_impl_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_storage_impl_unittest.cc b/webkit/appcache/appcache_storage_impl_unittest.cc index 6c153a5..116ce47 100644 --- a/webkit/appcache/appcache_storage_impl_unittest.cc +++ b/webkit/appcache/appcache_storage_impl_unittest.cc @@ -108,11 +108,13 @@ class AppCacheStorageImplTest : public testing::Test { } void OnMainResponseFound(const GURL& url, const AppCacheEntry& entry, + const GURL& fallback_url, const AppCacheEntry& fallback_entry, int64 cache_id, const GURL& manifest_url, bool was_blocked_by_policy) { found_url_ = url; found_entry_ = entry; + found_fallback_url_ = fallback_url; found_fallback_entry_ = fallback_entry; found_cache_id_ = cache_id; found_manifest_url_ = manifest_url; @@ -132,6 +134,7 @@ class AppCacheStorageImplTest : public testing::Test { bool obsoleted_success_; GURL found_url_; AppCacheEntry found_entry_; + GURL found_fallback_url_; AppCacheEntry found_fallback_entry_; int64 found_cache_id_; GURL found_manifest_url_; @@ -739,6 +742,7 @@ class AppCacheStorageImplTest : public testing::Test { EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_); EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id()); EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id()); + EXPECT_TRUE(delegate()->found_fallback_url_.is_empty()); EXPECT_EQ(0, delegate()->found_entry_.types()); EXPECT_EQ(0, delegate()->found_fallback_entry_.types()); TestFinished(); @@ -858,6 +862,7 @@ class AppCacheStorageImplTest : public testing::Test { EXPECT_EQ(1, delegate()->found_cache_id_); EXPECT_FALSE(delegate()->found_entry_.has_response_id()); EXPECT_EQ(2, delegate()->found_fallback_entry_.response_id()); + EXPECT_EQ(kEntryUrl2, delegate()->found_fallback_url_); EXPECT_TRUE(delegate()->found_fallback_entry_.IsFallback()); TestFinished(); } @@ -954,6 +959,7 @@ class AppCacheStorageImplTest : public testing::Test { EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_); EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id()); EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id()); + EXPECT_TRUE(delegate()->found_fallback_url_.is_empty()); EXPECT_EQ(0, delegate()->found_entry_.types()); EXPECT_EQ(0, delegate()->found_fallback_entry_.types()); |