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

fix: add favicon test asset #6868

Merged
merged 4 commits into from Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added test/assets/favicon.ico
Binary file not shown.
10 changes: 6 additions & 4 deletions test/assets/offscreenbuttons.html
@@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
button {
position: absolute;
Expand Down Expand Up @@ -29,8 +30,9 @@
<button id=btn9>9</button>
<button id=btn10>10</button>
<script>
window.addEventListener('DOMContentLoaded', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't around when this test was created, but I imagine it was written this way assuming the favicon warning would be logged before DOMContentLoaded. Now that we have a favicon, we no longer need to try and avoid the error message.

for (const button of Array.from(document.querySelectorAll('button')))
button.addEventListener('click', () => console.log('button #' + button.textContent + ' clicked'), false);
}, false);
for (const button of document.querySelectorAll('button')) {
button.addEventListener('click', () => {
console.log(`button #${button.textContent} clicked`);
});
}
</script>
2 changes: 1 addition & 1 deletion test/click.spec.ts
Expand Up @@ -132,7 +132,7 @@ describe('Page.click', function () {
})
).toBe(text);
});
itFailsFirefox('should click offscreen buttons', async () => {
it('should click offscreen buttons', async () => {
const { page, server } = getTestState();

await page.goto(server.PREFIX + '/offscreenbuttons.html');
Expand Down