Bug 1361675 - Cookie import test fails on Win 10. r=Gijs

MozReview-Commit-ID: 70iJjYaW1ya

--HG--
extra : rebase_source : c8edce73f2222d4fd8212fe63415d9d3189e09b2
This commit is contained in:
Marco Bonardo 2017-05-12 10:19:02 +02:00
Родитель 72c31d122b
Коммит de3e8620ea
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -467,8 +467,9 @@ Cookies.prototype = {
if (!this.__cookiesFolder) {
let cookiesFolder = Services.dirsvc.get("CookD", Ci.nsIFile);
if (cookiesFolder.exists() && cookiesFolder.isReadable()) {
// Check if UAC is enabled.
if (Services.appinfo.QueryInterface(Ci.nsIWinAppHelper).userCanElevate) {
// In versions up to Windows 7, check if UAC is enabled.
if (AppConstants.isPlatformAndVersionAtMost("win", "6.1") &&
Services.appinfo.QueryInterface(Ci.nsIWinAppHelper).userCanElevate) {
cookiesFolder.append("Low");
}
this.__cookiesFolder = cookiesFolder;
@ -512,7 +513,7 @@ Cookies.prototype = {
while (entries.hasMoreElements()) {
let entry = entries.getNext().QueryInterface(Ci.nsIFile);
// Skip eventual bogus entries.
if (!entry.isFile() || !/\.txt$/.test(entry.leafName))
if (!entry.isFile() || !/\.(cookie|txt)$/.test(entry.leafName))
continue;
this._readCookieFile(entry, function(aSuccess) {