-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Cookie consent notice banner (Filterlist)</title> | ||
|
||
<script src='./filterlist.js' defer></script> | ||
</head> | ||
<body> | ||
<p><a href="/index.html">[Home]</a></p> | ||
|
||
<p>Tests for filterlist-based hiding of cookie banners.</P> | ||
|
||
<div id="privacy-test-page-cmp-test-banner-filterlist"> | ||
This is a fake cookie banner that should be hidden by filterlist. | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const acceptButton = document.createElement('button'); | ||
acceptButton.innerText = 'Accept all'; | ||
acceptButton.id = 'accept-all'; | ||
const banner = document.quesrySelector('#privacy-test-page-cmp-test-banner-filterlist'); | ||
banner.appendChild(acceptButton); | ||
acceptButton.addEventListener('click', (ev) => { | ||
ev.target.innerText = 'Accept was clicked!'; | ||
window.results.results.push('accept_button_clicked'); | ||
}); | ||
|
||
setTimeout(() => { | ||
if (window.getComputedStyle(banner).opacity === '0') { | ||
window.results.results.push('banner_hidden'); | ||
} | ||
}, 500); | ||
|
||
window.results = { | ||
page: 'autoconsent-filterlist', | ||
results: [] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters