mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
45f8681fa5
The dom/base tests changed here use SpecialPowers.loadChromeScript to construct a DOM File in the parent and send it to the child, using the existing remote-blob infrastructure. The dom/html tests don't need a real file, so they now construct in-memory files. As a convenient side-effect, these tests are now enabled for desktop e10s (they were already being run out-of-process on B2G); most of them failed before this change due to the code that's being moved/removed.
16 lines
498 B
JavaScript
16 lines
498 B
JavaScript
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|
Cu.importGlobalProperties(["File"]);
|
|
|
|
let testFile = Cc["@mozilla.org/file/directory_service;1"]
|
|
.getService(Ci.nsIDirectoryService)
|
|
.QueryInterface(Ci.nsIProperties)
|
|
.get("ProfD", Ci.nsIFile);
|
|
testFile.append("prefs.js");
|
|
|
|
addMessageListener("file.open", function () {
|
|
sendAsyncMessage("file.opened", {
|
|
file: new File(testFile),
|
|
mtime: testFile.lastModifiedTime,
|
|
});
|
|
});
|