Index: third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
index 894c2b5812315bf3b26fc92cdea9b09203a9f494..f0da04703b8adb7884ee5b85c1899ae27e337db5 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
@@ -52,6 +52,7 @@ |
#include "public/platform/WebCachePolicy.h" |
#include "public/platform/WebDocumentSubresourceFilter.h" |
#include "public/platform/WebInsecureRequestPolicy.h" |
+#include "public/web/WebDataSaverFlag.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -790,7 +791,7 @@ TEST_F(FrameFetchContextTest, SetFirstPartyCookieAndRequestorOrigin) { |
// Tests if "Save-Data" header is correctly added on the first load and reload. |
TEST_F(FrameFetchContextTest, EnableDataSaver) { |
Settings* settings = document->GetFrame()->GetSettings(); |
- settings->SetDataSaverEnabled(true); |
+ settings->SetDataSaverFlag(WebDataSaverFlag::kEnabled); |
ResourceRequest resource_request("http://www.example.com"); |
fetch_context->AddAdditionalRequestHeaders(resource_request, |
kFetchMainResource); |
@@ -814,24 +815,24 @@ TEST_F(FrameFetchContextTest, DisabledDataSaver) { |
// Tests if reload variants can reflect the current data saver setting. |
TEST_F(FrameFetchContextTest, ChangeDataSaverConfig) { |
Settings* settings = document->GetFrame()->GetSettings(); |
- settings->SetDataSaverEnabled(true); |
+ settings->SetDataSaverFlag(WebDataSaverFlag::kEnabled); |
ResourceRequest resource_request("http://www.example.com"); |
fetch_context->AddAdditionalRequestHeaders(resource_request, |
kFetchMainResource); |
EXPECT_EQ("on", resource_request.HttpHeaderField("Save-Data")); |
- settings->SetDataSaverEnabled(false); |
+ settings->SetDataSaverFlag(WebDataSaverFlag::kDisabled); |
document->Loader()->SetLoadType(kFrameLoadTypeReload); |
fetch_context->AddAdditionalRequestHeaders(resource_request, |
kFetchMainResource); |
EXPECT_EQ(String(), resource_request.HttpHeaderField("Save-Data")); |
- settings->SetDataSaverEnabled(true); |
+ settings->SetDataSaverFlag(WebDataSaverFlag::kEnabled); |
fetch_context->AddAdditionalRequestHeaders(resource_request, |
kFetchMainResource); |
EXPECT_EQ("on", resource_request.HttpHeaderField("Save-Data")); |
- settings->SetDataSaverEnabled(false); |
+ settings->SetDataSaverFlag(WebDataSaverFlag::kDisabled); |
document->Loader()->SetLoadType(kFrameLoadTypeReload); |
fetch_context->AddAdditionalRequestHeaders(resource_request, |
kFetchMainResource); |