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

Unified Diff: content/browser/shared_worker/shared_worker_instance_unittest.cc

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: same as PS6 Created 3 years, 7 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: content/browser/shared_worker/shared_worker_instance_unittest.cc
diff --git a/content/browser/shared_worker/shared_worker_instance_unittest.cc b/content/browser/shared_worker/shared_worker_instance_unittest.cc
index 15fff635facdcf3838c7bfe38ba08af07f41570d..f3683b8e89d77984499507c9da8ca7fa18429c17 100644
--- a/content/browser/shared_worker/shared_worker_instance_unittest.cc
+++ b/content/browser/shared_worker/shared_worker_instance_unittest.cc
@@ -56,7 +56,8 @@ TEST_F(SharedWorkerInstanceTest, MatchesTest) {
GURL("http://example.com/w.js"), base::string16(), base::string16(),
blink::kWebContentSecurityPolicyTypeReport, blink::kWebAddressSpacePublic,
browser_context_->GetResourceContext(), partition_id_,
- blink::kWebSharedWorkerCreationContextTypeNonsecure);
+ blink::kWebSharedWorkerCreationContextTypeNonsecure,
+ false /* data_saver_enabled */);
EXPECT_TRUE(Matches(instance1, "http://example.com/w.js", ""));
EXPECT_FALSE(Matches(instance1, "http://example.com/w2.js", ""));
EXPECT_FALSE(Matches(instance1, "http://example.net/w.js", ""));
@@ -70,7 +71,8 @@ TEST_F(SharedWorkerInstanceTest, MatchesTest) {
GURL("http://example.com/w.js"), base::ASCIIToUTF16("name"),
base::string16(), blink::kWebContentSecurityPolicyTypeReport,
blink::kWebAddressSpacePublic, browser_context_->GetResourceContext(),
- partition_id_, blink::kWebSharedWorkerCreationContextTypeNonsecure);
+ partition_id_, blink::kWebSharedWorkerCreationContextTypeNonsecure,
+ false /* data_saver_enabled */);
EXPECT_FALSE(Matches(instance2, "http://example.com/w.js", ""));
EXPECT_FALSE(Matches(instance2, "http://example.com/w2.js", ""));
EXPECT_FALSE(Matches(instance2, "http://example.net/w.js", ""));
@@ -92,7 +94,8 @@ TEST_F(SharedWorkerInstanceTest, AddressSpace) {
base::string16(), blink::kWebContentSecurityPolicyTypeReport,
static_cast<blink::WebAddressSpace>(i),
browser_context_->GetResourceContext(), partition_id_,
- blink::kWebSharedWorkerCreationContextTypeNonsecure);
+ blink::kWebSharedWorkerCreationContextTypeNonsecure,
+ false /* data_saver_enabled */);
EXPECT_EQ(static_cast<blink::WebAddressSpace>(i),
instance.creation_address_space());
}
« no previous file with comments | « content/browser/shared_worker/shared_worker_instance.cc ('k') | content/browser/shared_worker/shared_worker_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698