Skip to content

Commit

Permalink
Update (#1042)
Browse files Browse the repository at this point in the history
* fix(conftest.py): respect number of browsers in fixture

* chore(deps): update dependency versions

* chore(Firefox): update to 115

* fix(profileDirIO): use PathUtils and IOUtils instead of osfile

* fix(pytest): revert to headless

* chore(changelog): update to v0.23.0
  • Loading branch information
vringar authored Aug 3, 2023
1 parent d232852 commit 6c91b7d
Show file tree
Hide file tree
Showing 14 changed files with 1,878 additions and 1,404 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ jobs:
env:
DISPLAY: ":99.0"
TESTS: ${{ matrix.test-groups }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: OpenWPM # Name of the check run which will be created
path: junit-report.xml # Path to test results
reporter: java-junit # Format of test results
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.23.0 - 2023-08-03

Bump to Firefox 115.0.3

## v0.22.0 - 2023-06-17

Bump to Firefox 114.0.1
Expand Down
13 changes: 6 additions & 7 deletions Extension/bundled/privileged/profileDirIO/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ChromeUtils.defineModuleGetter(
"ExtensionCommon",
"resource://gre/modules/ExtensionCommon.jsm",
);
ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
Cu.importGlobalProperties(["TextEncoder", "TextDecoder"]);

this.profileDirIO = class extends ExtensionAPI {
Expand All @@ -13,13 +12,13 @@ this.profileDirIO = class extends ExtensionAPI {
async writeFile(filename, data) {
const encoder = new TextEncoder();
const array = encoder.encode(data);
const path = OS.Path.join(OS.Constants.Path.profileDir, filename);
const tmpPath = OS.Path.join(
OS.Constants.Path.profileDir,
const path = PathUtils.join(PathUtils.profileDir, filename);
const tmpPath = PathUtils.join(
PathUtils.profileDir,
filename + ".tmp",
);
try {
await OS.File.writeAtomic(path, array, { tmpPath });
await IOUtils.write(path, array, { tmpPath });
console.log(`Wrote to ${path}`);
return true;
} catch (e) {
Expand All @@ -29,9 +28,9 @@ this.profileDirIO = class extends ExtensionAPI {
},
async readFile(filename) {
const decoder = new TextDecoder();
const path = OS.Path.join(OS.Constants.Path.profileDir, filename);
const path = PathUtils.join(PathUtils.profileDir, filename);
try {
const array = await OS.File.read(path);
const array = await IOUtils.read(path);
return decoder.decode(array);
} catch (e) {
Cu.reportError(e);
Expand Down
18 changes: 9 additions & 9 deletions Extension/bundled/privileged/stackDump/OpenWPMStackDumpChild.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Controller {
channel.loadInfo &&
channel.loadInfo.loadingDocument === null &&
channel.loadInfo.loadingPrincipal ===
Services.scriptSecurityManager.getSystemPrincipal()
Services.scriptSecurityManager.getSystemPrincipal()
) {
return false;
}
Expand Down Expand Up @@ -134,14 +134,14 @@ class Controller {
// Format described here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
stacktrace.push(
frame.name +
"@" +
frame.filename +
":" +
frame.lineNumber +
":" +
frame.columnNumber +
";" +
frame.asyncCause,
"@" +
frame.filename +
":" +
frame.lineNumber +
":" +
frame.columnNumber +
";" +
frame.asyncCause,
);
frame = frame.caller || frame.asyncCaller;
}
Expand Down
Loading

0 comments on commit 6c91b7d

Please sign in to comment.