From 2f6ca07bba7c27d933a5a5418e06165d43e6e901 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Wed, 8 Sep 2021 23:09:08 +0200 Subject: [PATCH] Added 304 test For #577 --- test/cspTest.js | 9 ++++++++- test/cspTest.php | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/test/cspTest.js b/test/cspTest.js index a12ef65..507e754 100644 --- a/test/cspTest.js +++ b/test/cspTest.js @@ -18,4 +18,11 @@ addLine("window name after set: " + window.name); const hashValue = await testAPI.hash(canvasAPI.fingerprint(window).url); addLine("canvas hash: " + hashValue); -}()); \ No newline at end of file +}()); + +document.getElementById("reloadWith304").addEventListener("click", function(){ + "use strict"; + + document.cookie = "304=1"; + location.reload(); +}); \ No newline at end of file diff --git a/test/cspTest.php b/test/cspTest.php index f72f7cb..cc8737b 100644 --- a/test/cspTest.php +++ b/test/cspTest.php @@ -1,6 +1,12 @@ @@ -18,11 +24,15 @@ header("Content-Security-Policy: default-src 'none'; img-src 'self'; script-src

Tests

+ \ No newline at end of file