Bug 1785123: Enable Origin Private File System (OPFS) by default on Nightly r=dom-storage-reviewers,asuth,jari,jstutte,janv,dom-worker-reviewers

Intent to prototype sent to dev-platform on Aug 19, 2022:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/gc4BxcgkN7E

Intent to ship sent to dev-platform on Nov 10, 2022:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/dsRxP4liTek

Differential Revision: https://phabricator.services.mozilla.com/D154818
This commit is contained in:
Randell Jesup 2023-01-09 20:43:44 +00:00
Родитель 9509f4c4f9
Коммит d42eaceade
8 изменённых файлов: 61 добавлений и 1 удалений

Просмотреть файл

@ -22,6 +22,11 @@ namespace mozilla::dom::fs::test {
class TestFileSystemDirectoryHandle : public ::testing::Test {
protected:
void SetUp() override {
// TODO: Fix the test to not depend on CreateFileSystemManagerParent
// failure because of the pref set to false.
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", false);
mRequestHandler = MakeUnique<MockFileSystemRequestHandler>();
mMetadata = FileSystemEntryMetadata("dir"_ns, u"Directory"_ns,
/* directory */ true);
@ -30,6 +35,9 @@ class TestFileSystemDirectoryHandle : public ::testing::Test {
}
void TearDown() override {
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", true);
if (!mManager->IsShutdown()) {
mManager->Shutdown();
}

Просмотреть файл

@ -22,6 +22,11 @@ namespace mozilla::dom::fs::test {
class TestFileSystemFileHandle : public ::testing::Test {
protected:
void SetUp() override {
// TODO: Fix the test to not depend on CreateFileSystemManagerParent
// failure because of the pref set to false.
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", false);
mRequestHandler = MakeUnique<MockFileSystemRequestHandler>();
mMetadata =
FileSystemEntryMetadata("file"_ns, u"File"_ns, /* directory */ false);
@ -29,6 +34,9 @@ class TestFileSystemFileHandle : public ::testing::Test {
}
void TearDown() override {
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", true);
if (!mManager->IsShutdown()) {
mManager->Shutdown();
}

Просмотреть файл

@ -20,6 +20,11 @@ namespace mozilla::dom::fs::test {
class TestFileSystemHandle : public ::testing::Test {
protected:
void SetUp() override {
// TODO: Fix the test to not depend on CreateFileSystemManagerParent
// failure because of the pref set to false.
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", false);
mDirMetadata = FileSystemEntryMetadata("dir"_ns, u"Directory"_ns,
/* directory */ true);
mFileMetadata =
@ -28,6 +33,9 @@ class TestFileSystemHandle : public ::testing::Test {
}
void TearDown() override {
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", true);
if (!mManager->IsShutdown()) {
mManager->Shutdown();
}

Просмотреть файл

@ -18,9 +18,19 @@ namespace mozilla::dom::fs::test {
class TestFileSystemBackgroundRequestHandler : public ::testing::Test {
protected:
void SetUp() override {
// TODO: Fix the test to not depend on CreateFileSystemManagerParent
// failure because of the pref set to false.
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", false);
mFileSystemManagerChild = MakeAndAddRef<TestFileSystemManagerChild>();
}
void TearDown() override {
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
prefs->SetBoolPref("dom.fs.enabled", true);
}
RefPtr<FileSystemBackgroundRequestHandler>
GetFileSystemBackgroundRequestHandler() {
return MakeRefPtr<FileSystemBackgroundRequestHandler>(

Просмотреть файл

@ -189,6 +189,14 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
"FileReader",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemDirectoryHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemFileHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemWritableFileStream", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
"FontFace",
// IMPORTANT: Do not change this list without review from a DOM peer!
"FontFaceSet",

Просмотреть файл

@ -417,12 +417,20 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemDirectoryEntry", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemDirectoryHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemDirectoryReader", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemEntry", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemFileEntry", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemFileHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemWritableFileStream", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FocusEvent", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FormData", insecureContext: true },

Просмотреть файл

@ -194,6 +194,16 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileReaderSync", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemDirectoryHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemFileHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemSyncAccessHandle", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FileSystemWritableFileStream", nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FontFace", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "FontFaceSet", insecureContext: true },

Просмотреть файл

@ -3888,7 +3888,7 @@
# Whether the File System API is enabled
- name: dom.fs.enabled
type: RelaxedAtomicBool
value: false
value: @IS_NIGHTLY_BUILD@
mirror: always
# Whether the WritableFileStream is enabled or disabled.