Commit 8d9054c8 authored by K. Moon's avatar K. Moon Committed by Commit Bot

Make PDF partial loading disabled the default

The experiment to disable PDF partial loading was successful, so we're
making it the default now.

The PdfPartialLoading and PdfIncrementalLoading features will be kept
for now for tests that rely on these features (often to test mostly
unrelated behaviors).

Fixed: 1115149
Change-Id: Iea45106f919d1fa608fcf6cfc28e432c88d4d75b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505972
Commit-Queue: Jesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Auto-Submit: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823998}
parent 24f4a248
...@@ -275,7 +275,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) { ...@@ -275,7 +275,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) {
scoped_feature_list_.Reset(); scoped_feature_list_.Reset();
scoped_feature_list_.Init(); scoped_feature_list_.Init();
// Test that partial loading is enabled when feature is defaulted. // Test that partial loading is disabled when feature is defaulted.
TestClient client; TestClient client;
client.SetCanUsePartialLoading(); client.SetCanUsePartialLoading();
DocumentLoaderImpl loader(&client); DocumentLoaderImpl loader(&client);
...@@ -284,7 +284,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) { ...@@ -284,7 +284,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) {
EXPECT_FALSE(loader.is_partial_loader_active()); EXPECT_FALSE(loader.is_partial_loader_active());
// Always send initial data from FullPageLoader. // Always send initial data from FullPageLoader.
client.full_page_loader_data()->CallReadCallback(kDefaultRequestSize); client.full_page_loader_data()->CallReadCallback(kDefaultRequestSize);
EXPECT_TRUE(loader.is_partial_loader_active()); EXPECT_FALSE(loader.is_partial_loader_active());
} }
TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDisabled) { TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDisabled) {
......
...@@ -17,13 +17,13 @@ const base::Feature kPdfHonorJsContentSettings = { ...@@ -17,13 +17,13 @@ const base::Feature kPdfHonorJsContentSettings = {
// "Incremental loading" refers to loading the PDF as it arrives. // "Incremental loading" refers to loading the PDF as it arrives.
// TODO(crbug.com/1064175): Remove this once incremental loading is fixed. // TODO(crbug.com/1064175): Remove this once incremental loading is fixed.
const base::Feature kPdfIncrementalLoading = {"PdfIncrementalLoading", const base::Feature kPdfIncrementalLoading = {
base::FEATURE_ENABLED_BY_DEFAULT}; "PdfIncrementalLoading", base::FEATURE_DISABLED_BY_DEFAULT};
// "Partial loading" refers to loading only specific parts of the PDF. // "Partial loading" refers to loading only specific parts of the PDF.
// TODO(crbug.com/1064175): Remove this once partial loading is fixed. // TODO(crbug.com/1064175): Remove this once partial loading is fixed.
const base::Feature kPdfPartialLoading = {"PdfPartialLoading", const base::Feature kPdfPartialLoading = {"PdfPartialLoading",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kPDFViewerUpdate = {"PDFViewerUpdate", const base::Feature kPDFViewerUpdate = {"PDFViewerUpdate",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -382,7 +382,7 @@ TEST_F(PDFiumEngineTest, GetBadPdfVersion) { ...@@ -382,7 +382,7 @@ TEST_F(PDFiumEngineTest, GetBadPdfVersion) {
} }
TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureDefault) { TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureDefault) {
EXPECT_TRUE(TryLoadIncrementally()); EXPECT_FALSE(TryLoadIncrementally());
} }
TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureEnabled) { TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureEnabled) {
...@@ -417,6 +417,9 @@ TEST_F(PDFiumEngineTest, RequestThumbnail) { ...@@ -417,6 +417,9 @@ TEST_F(PDFiumEngineTest, RequestThumbnail) {
} }
TEST_F(PDFiumEngineTest, RequestThumbnailLinearized) { TEST_F(PDFiumEngineTest, RequestThumbnailLinearized) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kPdfIncrementalLoading);
NiceMock<MockTestClient> client; NiceMock<MockTestClient> client;
InitializeEngineResult initialize_result = InitializeEngineWithoutLoading( InitializeEngineResult initialize_result = InitializeEngineWithoutLoading(
&client, FILE_PATH_LITERAL("linearized.pdf")); &client, FILE_PATH_LITERAL("linearized.pdf"));
...@@ -460,6 +463,8 @@ using PDFiumEngineDeathTest = PDFiumEngineTest; ...@@ -460,6 +463,8 @@ using PDFiumEngineDeathTest = PDFiumEngineTest;
TEST_F(PDFiumEngineDeathTest, RequestThumbnailRedundant) { TEST_F(PDFiumEngineDeathTest, RequestThumbnailRedundant) {
::testing::FLAGS_gtest_death_test_style = "threadsafe"; ::testing::FLAGS_gtest_death_test_style = "threadsafe";
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kPdfIncrementalLoading);
NiceMock<MockTestClient> client; NiceMock<MockTestClient> client;
InitializeEngineResult initialize_result = InitializeEngineWithoutLoading( InitializeEngineResult initialize_result = InitializeEngineWithoutLoading(
......
...@@ -5340,41 +5340,6 @@ ...@@ -5340,41 +5340,6 @@
] ]
} }
], ],
"PdfPartialLoading": [
{
"platforms": [
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Disabled",
"disable_features": [
"PdfIncrementalLoading",
"PdfPartialLoading"
]
},
{
"name": "IncrementalOnly",
"enable_features": [
"PdfIncrementalLoading"
],
"disable_features": [
"PdfPartialLoading"
]
},
{
"name": "Enabled",
"enable_features": [
"PdfIncrementalLoading",
"PdfPartialLoading"
]
}
]
}
],
"PerProcessReclaim": [ "PerProcessReclaim": [
{ {
"platforms": [ "platforms": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment