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.
17 lines
585 B
JavaScript
17 lines
585 B
JavaScript
var file;
|
|
Components.utils.importGlobalProperties(["File"]);
|
|
|
|
addMessageListener("file.create", function (message) {
|
|
file = Components.classes["@mozilla.org/file/directory_service;1"]
|
|
.getService(Components.interfaces.nsIProperties)
|
|
.get("TmpD", Components.interfaces.nsIFile);
|
|
file.append("foo.txt");
|
|
file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0600);
|
|
sendAsyncMessage("file.created", new File(file));
|
|
});
|
|
|
|
addMessageListener("file.remove", function (message) {
|
|
file.remove(false);
|
|
sendAsyncMessage("file.removed", {});
|
|
});
|