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

Unified Diff: webkit/appcache/appcache_request_handler_unittest.cc

Issue 6727006: Select a more appropiate appcache based on the opener or the parent of the new document. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/appcache/appcache_request_handler_unittest.cc
===================================================================
--- webkit/appcache/appcache_request_handler_unittest.cc (revision 81647)
+++ webkit/appcache/appcache_request_handler_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -223,6 +223,8 @@
fallback_job = handler_->MaybeLoadFallbackForResponse(request_.get());
EXPECT_FALSE(fallback_job);
+ EXPECT_TRUE(host_->preferred_manifest_url().is_empty());
+
TestFinished();
}
@@ -264,6 +266,9 @@
fallback_job = handler_->MaybeLoadFallbackForResponse(request_.get());
EXPECT_FALSE(fallback_job);
+ EXPECT_EQ(GURL("http://blah/manifest/"),
+ host_->preferred_manifest_url());
+
TestFinished();
}
@@ -317,6 +322,9 @@
EXPECT_TRUE(host_->main_resource_was_fallback_);
EXPECT_EQ(GURL("http://blah/fallbackurl"), host_->fallback_url_);
+ EXPECT_EQ(GURL("http://blah/manifest/"),
+ host_->preferred_manifest_url());
+
TestFinished();
}
@@ -366,6 +374,7 @@
// Precondition, the host is waiting on cache selection.
scoped_refptr<AppCache> cache(MakeNewCache());
host_->pending_selected_cache_id_ = cache->cache_id();
+ host_->set_preferred_manifest_url(cache->owning_group()->manifest_url());
request_.reset(new MockURLRequest(GURL("http://blah/")));
handler_.reset(host_->CreateRequestHandler(request_.get(),

Powered by Google App Engine
This is Rietveld 408576698