diff --git a/dom/localstorage/moz.build b/dom/localstorage/moz.build index 9a9228c8b28b..00c9a96e6681 100644 --- a/dom/localstorage/moz.build +++ b/dom/localstorage/moz.build @@ -17,7 +17,7 @@ TEST_HARNESS_FILES.xpcshell.dom.localstorage.test.unit += [ "test/unit/databaseShadowing-shared.js", ] -TEST_DIRS += ["test/gtest"] +TEST_DIRS += ["test"] XPIDL_SOURCES += [ "nsILocalStorageManager.idl", diff --git a/dom/localstorage/test/modules/system/LocalStorageUtils.sys.mjs b/dom/localstorage/test/modules/system/LocalStorageUtils.sys.mjs new file mode 100644 index 000000000000..8fb20872aee2 --- /dev/null +++ b/dom/localstorage/test/modules/system/LocalStorageUtils.sys.mjs @@ -0,0 +1,15 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +export const LocalStorageUtils = { + createStorage(principal) { + return Services.domStorageManager.createStorage( + null, + principal, + principal, + "" + ); + }, +}; diff --git a/dom/localstorage/test/moz.build b/dom/localstorage/test/moz.build new file mode 100644 index 000000000000..89d10993d9e0 --- /dev/null +++ b/dom/localstorage/test/moz.build @@ -0,0 +1,11 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +TEST_DIRS += ["gtest"] + +TESTING_JS_MODULES.dom.localstorage.test.modules += [ + "modules/system/LocalStorageUtils.sys.mjs", +]