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: Jesse Doherty <jwd@chromium.org> Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Cr-Commit-Position: refs/heads/master@{#823998}
This commit is contained in:
pdf
testing/variations
@ -275,7 +275,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) {
|
||||
scoped_feature_list_.Reset();
|
||||
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;
|
||||
client.SetCanUsePartialLoading();
|
||||
DocumentLoaderImpl loader(&client);
|
||||
@ -284,7 +284,7 @@ TEST_F(DocumentLoaderImplTest, PartialLoadingFeatureDefault) {
|
||||
EXPECT_FALSE(loader.is_partial_loader_active());
|
||||
// Always send initial data from FullPageLoader.
|
||||
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) {
|
||||
|
@ -17,13 +17,13 @@ const base::Feature kPdfHonorJsContentSettings = {
|
||||
|
||||
// "Incremental loading" refers to loading the PDF as it arrives.
|
||||
// TODO(crbug.com/1064175): Remove this once incremental loading is fixed.
|
||||
const base::Feature kPdfIncrementalLoading = {"PdfIncrementalLoading",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
const base::Feature kPdfIncrementalLoading = {
|
||||
"PdfIncrementalLoading", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// "Partial loading" refers to loading only specific parts of the PDF.
|
||||
// TODO(crbug.com/1064175): Remove this once partial loading is fixed.
|
||||
const base::Feature kPdfPartialLoading = {"PdfPartialLoading",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kPDFViewerUpdate = {"PDFViewerUpdate",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
@ -382,7 +382,7 @@ TEST_F(PDFiumEngineTest, GetBadPdfVersion) {
|
||||
}
|
||||
|
||||
TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureDefault) {
|
||||
EXPECT_TRUE(TryLoadIncrementally());
|
||||
EXPECT_FALSE(TryLoadIncrementally());
|
||||
}
|
||||
|
||||
TEST_F(PDFiumEngineTest, IncrementalLoadingFeatureEnabled) {
|
||||
@ -417,6 +417,9 @@ TEST_F(PDFiumEngineTest, RequestThumbnail) {
|
||||
}
|
||||
|
||||
TEST_F(PDFiumEngineTest, RequestThumbnailLinearized) {
|
||||
base::test::ScopedFeatureList scoped_feature_list;
|
||||
scoped_feature_list.InitAndEnableFeature(features::kPdfIncrementalLoading);
|
||||
|
||||
NiceMock<MockTestClient> client;
|
||||
InitializeEngineResult initialize_result = InitializeEngineWithoutLoading(
|
||||
&client, FILE_PATH_LITERAL("linearized.pdf"));
|
||||
@ -460,6 +463,8 @@ using PDFiumEngineDeathTest = PDFiumEngineTest;
|
||||
|
||||
TEST_F(PDFiumEngineDeathTest, RequestThumbnailRedundant) {
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
base::test::ScopedFeatureList scoped_feature_list;
|
||||
scoped_feature_list.InitAndEnableFeature(features::kPdfIncrementalLoading);
|
||||
|
||||
NiceMock<MockTestClient> client;
|
||||
InitializeEngineResult initialize_result = InitializeEngineWithoutLoading(
|
||||
|
@ -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": [
|
||||
{
|
||||
"platforms": [
|
||||
|
Reference in New Issue
Block a user