Skip to content

Commit

Permalink
Use local config for canvas tests. (duckduckgo#2090)
Browse files Browse the repository at this point in the history
* Use local config for canvas tests.

* Bump test pages version
  • Loading branch information
sammacbeth authored Jul 4, 2023
1 parent ebba43b commit a5e85e0
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 23 deletions.
5 changes: 4 additions & 1 deletion integration-test/data/configs/fingerprint-protection.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"globalThis.dbg.tds.config.unprotectedTempoary": []
"globalThis.dbg.tds.config.unprotectedTempoary": [],
"globalThis.dbg.tds.config.features.fingerprintingCanvas": {
"state": "enabled"
}
}
4 changes: 3 additions & 1 deletion integration-test/test-canvas.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { test, expect } from './helpers/playwrightHarness'
import { forExtensionLoaded } from './helpers/backgroundWait'
import { routeFromLocalhost } from './helpers/testPages'
import { loadTestConfig } from './helpers/testConfig'

test.describe('Canvas verification', () => {
test.beforeEach(async ({ context, page }) => {
test.beforeEach(async ({ context, backgroundPage }) => {
await forExtensionLoaded(context)
await loadTestConfig(backgroundPage, 'fingerprint-protection.json')
})

test('Canvas drawing should be different per hostname', async ({ page }) => {
Expand Down
64 changes: 44 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"is-plain-object": "5.0.0",
"jquery": "3.7.0",
"normalize.scss": "0.1.0",
"privacy-test-pages": "github:duckduckgo/privacy-test-pages#1.2.0",
"privacy-test-pages": "github:duckduckgo/privacy-test-pages#1.2.1",
"punycode": "2.3.0",
"seedrandom": "^3.0.5",
"tldts": "^6.0.8",
Expand Down

0 comments on commit a5e85e0

Please sign in to comment.