From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../test/xpcshell/test_extensions_path.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 devtools/client/aboutdebugging/test/xpcshell/test_extensions_path.js (limited to 'devtools/client/aboutdebugging/test/xpcshell/test_extensions_path.js') diff --git a/devtools/client/aboutdebugging/test/xpcshell/test_extensions_path.js b/devtools/client/aboutdebugging/test/xpcshell/test_extensions_path.js new file mode 100644 index 0000000000..1ec9f0d7c2 --- /dev/null +++ b/devtools/client/aboutdebugging/test/xpcshell/test_extensions_path.js @@ -0,0 +1,27 @@ +/* global equal */ + +"use strict"; + +const { + parseFileUri, +} = require("resource://devtools/client/aboutdebugging/src/modules/extensions-helper.js"); + +add_task(async function testParseFileUri() { + equal( + parseFileUri("file:///home/me/my-extension/"), + "/home/me/my-extension/", + "UNIX paths are supported" + ); + + equal( + parseFileUri("file:///C:/Documents/my-extension/"), + "C:/Documents/my-extension/", + "Windows paths are supported" + ); + + equal( + parseFileUri("file://home/Documents/my-extension/"), + "home/Documents/my-extension/", + "Windows network paths are supported" + ); +}); -- cgit v1.2.3