Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct 1p cosmetic filtering test to correctly handle ports #7779

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/data/cosmetic_filtering.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

function checkSelector(selector, property, expected) {
const checkSelectorInner = () => {
let elements = [].slice.call(document.querySelectorAll(selector));
let elements = Array.from(document.querySelectorAll(selector));
let result = elements.every(e => {
let style = window.getComputedStyle(e);
return style[property] === expected;
Expand All @@ -47,7 +47,7 @@
</script>
</head>
<body>
<div class="fpsponsored"><img src="b.com/sponsored/640x820.png"></div>
<div class="fpsponsored"><img src="/sponsored/640x820.png"></div>
<div id="ad-banner"><img src="https://example.com/logo.png" alt=""></div>
<div class="ad-banner">
<div class="ad" style="background: url(example.com)"><img src="https://example.com/logo.png" alt=""></div>
Expand Down