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

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

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: fix #include "public/web/WebDataSaverFlag.h" 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..6f167dc0605ece593cbbcacd739459d9d73d1431 100644
--- a/content/browser/shared_worker/shared_worker_instance_unittest.cc
+++ b/content/browser/shared_worker/shared_worker_instance_unittest.cc
@@ -14,6 +14,7 @@
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/web/WebDataSaverFlag.h"
namespace content {
@@ -56,7 +57,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,
+ blink::WebDataSaverFlag::kDisabled);
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 +72,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,
+ blink::WebDataSaverFlag::kDisabled);
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 +95,8 @@ TEST_F(SharedWorkerInstanceTest, AddressSpace) {
base::string16(), blink::kWebContentSecurityPolicyTypeReport,
static_cast<blink::WebAddressSpace>(i),
browser_context_->GetResourceContext(), partition_id_,
- blink::kWebSharedWorkerCreationContextTypeNonsecure);
+ blink::kWebSharedWorkerCreationContextTypeNonsecure,
+ blink::WebDataSaverFlag::kDisabled);
EXPECT_EQ(static_cast<blink::WebAddressSpace>(i),
instance.creation_address_space());
}

Powered by Google App Engine
This is Rietveld 408576698