From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- dom/html/test/script_fakepath.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dom/html/test/script_fakepath.js (limited to 'dom/html/test/script_fakepath.js') diff --git a/dom/html/test/script_fakepath.js b/dom/html/test/script_fakepath.js new file mode 100644 index 0000000000..ac24dc90a2 --- /dev/null +++ b/dom/html/test/script_fakepath.js @@ -0,0 +1,15 @@ +/* eslint-env mozilla/chrome-script */ + +Cu.importGlobalProperties(["File"]); + +addMessageListener("file.open", function (e) { + var tmpFile = Cc["@mozilla.org/file/directory_service;1"] + .getService(Ci.nsIDirectoryService) + .QueryInterface(Ci.nsIProperties) + .get("ProfD", Ci.nsIFile); + tmpFile.append("prefs.js"); + + File.createFromNsIFile(tmpFile).then(file => { + sendAsyncMessage("file.opened", { data: [file] }); + }); +}); -- cgit v1.2.3