Граф коммитов

231 Коммитов

Автор SHA1 Сообщение Дата
Rob Wu e520e9fd35 Bug 1903780 - Support directory names again in downloads.download r=geckoview-reviewers,NeilDeakin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D218719
2024-08-20 18:53:21 +00:00
Joel Maher 3d4dfe804d Bug 1903845 - Add 'os_integration' tags to test manifests for faster image verification. r=aryx,jgilbert,settings-reviewers,media-playback-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,migration-reviewers,padenot,dao,aminomancer,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214969
2024-07-09 13:01:55 +00:00
Neil Deakin e17b53a054 Bug 1891234, additional filename filter checks, r=Gijs,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D208659
2024-05-14 17:35:05 +00:00
Norisz Fay ea9db1a2ff Backed out changeset 4b7fe66103e5 (bug 1891234) for causing multiple failures CLOSED TREE 2024-05-06 22:28:08 +03:00
Neil Deakin 76bee39a96 Bug 1891234, additional filename filter checks, r=Gijs,extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D208659
2024-05-06 17:16:31 +00:00
Michael Hughes 64fe1d816e Bug 1884785 - Expose the path to the os default application to privileged extensions r=Gijs,necko-reviewers
Added in some code to expose the path to the os default application. Tested via tests on Windows. Mac and Linux will use the nsMIMEInfoImpl which will supply the functionality for them and be tested with the auto-tests.

Differential Revision: https://phabricator.services.mozilla.com/D204306
2024-03-25 23:19:17 +00:00
Michael Hughes e66ab7ac30 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nrishel,nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-25 23:19:17 +00:00
Ryan VanderMeulen 87a2b0ae6f Backed out changeset 102fa1186f2a (bug 1884265) for non-unified build bustage and test_getFromTypeAndExtension.js failures. 2024-03-18 21:55:00 -04:00
Michael Hughes d4689a98d0 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-18 16:18:27 +00:00
Cristian Tuns cc0efecf5c Backed out 3 changesets (bug 1884785, bug 1884265) for causing build bustages in nsLocalHandlerApp.cpp CLOSED TREE
Backed out changeset 08cb16bededc (bug 1884265)
Backed out changeset dc60eabb35ec (bug 1884785)
Backed out changeset 2de1412ec7e3 (bug 1884265)
2024-03-13 13:43:40 -04:00
Otto Länd ee6cc0bdef Bug 1884265, 1884785: apply code formatting via Lando
# ignore-this-changeset
2024-03-13 17:08:39 +00:00
Michael Hughes 444d0ac965 Bug 1884785 - Expose the path to the os default application to privileged extensions r=Gijs,necko-reviewers
Added in some code to expose the path to the os default application. Tested via tests on Windows. Mac and Linux will use the nsMIMEInfoImpl which will supply the functionality for them and be tested with the auto-tests.

Differential Revision: https://phabricator.services.mozilla.com/D204306
2024-03-13 16:24:50 +00:00
Michael Hughes 826b0f1e77 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-13 16:24:49 +00:00
Joel Maher 29e80ac522 Bug 1859901 - Batch 18 - migrate rest of xpcshell.ini -> toml. r=aryx,extension-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,profiler-reviewers,win-reviewers,robwu,julienw,nalexander,Standard8,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194891
2023-11-30 16:14:52 +00:00
Cosmin Sabou 5d7a0c46bf Bug 1817727 - Disable test_filename_sanitize.js on mac because of permafailures. r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D190974
2023-10-13 17:53:25 +00:00
Gijs Kruitbosch 57ba57f1a5 Bug 1845117 - re-introduce https and replacement character requirements for uriTemplates, r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D184381
2023-07-24 15:54:16 +00:00
Barret Rennie ad83745f8b Bug 1747472 - Remove FileUtils.getFile from uriloader/ r=mak
Differential Revision: https://phabricator.services.mozilla.com/D155891
2023-06-09 17:52:12 +00:00
Gregory Pappas fcc5b10abb Bug 1836027 - Remove browser.download.improvements_to_download_panel migrations r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D180290
2023-06-08 15:41:15 +00:00
Mark Banner 6725448902 Bug 1834176 - Convert consumers of NetUtil.jsm to import the ES module directly. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-06-07 08:42:36 +00:00
Gregory Pappas 941d7766f8 Bug 1822864 - Remove browser.download.improvements_to_download_panel pref r=Gijs,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D179300
2023-05-31 10:29:37 +00:00
Natalia Csoregi e87ecf485e Backed out 3 changesets (bug 1834222, bug 1834176) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset 346d3a1568dd (bug 1834222)
Backed out changeset ea1d8b634bfc (bug 1834176)
Backed out changeset 74d1880272d3 (bug 1834176)
2023-05-24 04:29:45 +03:00
Mark Banner fbc15bdb60 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 19:09:29 +00:00
Noemi Erli aa2f146d78 Backed out 2 changesets (bug 1834176) for causing xpc failures in test_unload.js CLOSED TREE
Backed out changeset 57876d77a652 (bug 1834176)
Backed out changeset ae2f0837b528 (bug 1834176)
2023-05-23 12:14:37 +03:00
Mark Banner e3e9a991b8 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 08:13:08 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Gijs Kruitbosch 83b725df8b Bug 1824959 - add tests for .desktop sanitization, r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D173966
2023-05-16 23:00:45 +00:00
Neil Deakin 1e8c68503b Bug 1824468, more tests for problematic extensions, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D173582
2023-05-16 11:41:38 +00:00
Neil Deakin 3a23bc2cef Bug 1824468, basic tests for validating extensions, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D173581
2023-05-16 11:41:38 +00:00
Mark Banner c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Neil Deakin 34df9a7220 Bug 1829981, reduce maximum filename length to 254, as Windows File Explorer won't allow deleting filenames longer than this, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D176911
2023-05-03 09:02:27 +00:00
Dana Keeler f0596227b1 Bug 1811645 - avoid an American English colloquialism meaning "nonsense" r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D175802
2023-04-20 22:24:00 +00:00
Neil Deakin 1d2e8169a6 Bug 1808918, use Untitled as the default filename when saving a file rather than index, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167028
2023-01-23 14:53:21 +00:00
Ben Hearsum 6c520ec6c8 Bug 1805919: disable tests that are currently failing against MSIX packages. r=jmaher,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165754
2023-01-11 14:45:03 +00:00
Neil Deakin 5192eb2a76 Bug 1802885, improve filename sanitization when filename begins with a period, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D165466
2023-01-10 14:58:04 +00:00
Barret Rennie 88d50de4b9 Bug 1541508 - Use Services.env in uriloader/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D160151
2022-11-25 19:09:12 +00:00
Mark Banner a9ec0b8434 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (uriloader/ dom/ docshell/). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161909
2022-11-17 12:00:28 +00:00
Mark Banner a24dca9645 Bug 1798212 - Replace defineModuleGetter in Integration.sys.mjs with a ES version. r=settings-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D161014
2022-11-07 17:56:10 +00:00
Cristian Tuns 4d37cf70f1 Backed out 19 changesets (bug 1541508) for causing xpcshell failures on test_notHeadlessByDefault.js CLOSED TREE
Backed out changeset 08476fa2bc27 (bug 1541508)
Backed out changeset 0bf7514845db (bug 1541508)
Backed out changeset aa612a5e9ef7 (bug 1541508)
Backed out changeset 6bb9360473f7 (bug 1541508)
Backed out changeset b3d8e92f50c2 (bug 1541508)
Backed out changeset fa40dded133e (bug 1541508)
Backed out changeset 2e7db4aa8d4f (bug 1541508)
Backed out changeset 6098e2eb62ea (bug 1541508)
Backed out changeset 2c599ee639c4 (bug 1541508)
Backed out changeset 7d44f6e2644c (bug 1541508)
Backed out changeset c1279c3d674c (bug 1541508)
Backed out changeset 8bd08a62a590 (bug 1541508)
Backed out changeset 740010cb005c (bug 1541508)
Backed out changeset 0bfc7dd85c62 (bug 1541508)
Backed out changeset c4374a351356 (bug 1541508)
Backed out changeset 44ccfeca7364 (bug 1541508)
Backed out changeset e944e706a523 (bug 1541508)
Backed out changeset 2c59d66f43e4 (bug 1541508)
Backed out changeset a1896eacb6f1 (bug 1541508)
2022-11-01 22:38:52 -04:00
Barret Rennie 3250d6ee4d Bug 1541508 - Use Services.env in uriloader/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D160151
2022-11-02 02:08:59 +00:00
Neil Deakin 7c2ed8357f Bug 1791033, avoid crash by computing the extension's byte length correctly and truncate the filename's extension when it is too long, r=gsvelto,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D159703
2022-10-21 09:11:27 +00:00
Cristian Tuns b27c341fe1 Backed out changeset 05f17b2551cb (bug 1791033) for causing xpcshell failures on test_filename_sanitize.js CLOSED TREE 2022-10-20 12:15:38 -04:00
Neil Deakin d174679a36 Bug 1791033, avoid crash by computing the extension's byte length correctly and truncate the filename's extension when it is too long, r=gsvelto,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D159703
2022-10-20 15:37:58 +00:00
Mike Conley 2ce45dc9bd Bug 1795188 - Migrate all uriloader/exthandler JSMs to ESMs. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D159345
2022-10-19 18:34:02 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Mark Banner 8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Marco Bonardo 107460db8e Bug 1789500 - filename sanitization may cut surrogate pairs when truncating. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D157516
2022-09-16 09:47:05 +00:00
Neil Deakin 895b11972d Bug 1772988, add some additional extensions for some media types as Windows doesn't provide some of them, causing valid extensions to be replaced when saving files, r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D155972
2022-09-02 15:33:35 +00:00
Paul Zuehlcke cc5eea6b97 Bug 1736688 - Remove telemetry probe: EXTERNAL_PROTOCOL_HANDLER_DIALOG_CONTEXT_SCHEME. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D156213
2022-09-02 10:35:44 +00:00
Butkovits Atila ca18bee08c Backed out changeset 517b6c2b1d57 (bug 1772988) for causing failures at test_filename_sanitize.js . CLOSED TREE 2022-08-30 22:56:49 +03:00