Bug 1605600 - Normalize file URI in browser_json_refresh.js. r=Honza

Differential Revision: https://phabricator.services.mozilla.com/D58087

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Oriol Brufau 2020-01-02 11:02:06 +00:00
Родитель b3b306e0bf
Коммит 0f8927cf00
2 изменённых файлов: 2 добавлений и 1 удалений

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

@ -11,6 +11,7 @@ add_task(async function() {
// generate file:// URI for JSON file and load in new tab
const dir = getChromeDir(getResolvedURI(gTestPath));
dir.append(TEST_JSON_FILE);
dir.normalize();
const uri = Services.io.newFileURI(dir);
const tab = await addJsonViewTab(uri.spec);

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

@ -56,7 +56,7 @@ async function addJsonViewTab(
// The `tabAdded` promise resolves when the JSON Viewer starts loading.
// This is usually what we want, however, it never resolves for unrecognized
// content types that trigger a download, nor for symlink file URIs.
// content types that trigger a download.
// On the other hand, `tabLoaded` always resolves, but not until the document
// is fully loaded, which is too late if `docReadyState !== "complete"`.
// Therefore, we race both promises.