Skip to content

Commit

Permalink
spec: fixup failures
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed May 5, 2022
1 parent dd39c65 commit 5fc761d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec-main/webview-spec.ts
Expand Up @@ -463,7 +463,7 @@ describe('<webview> tag', function () {
await Promise.all([enterHTMLFS, leaveHTMLFS, parentFullscreen]);
});

// FIXME(zcbenz): Fullscreen events do not work on Linux.
// FIXME: Fullscreen events do not work on Linux.
// This test is flaky on arm64 macOS.
ifit(process.platform !== 'linux' && process.arch !== 'arm64')('exiting fullscreen should unfullscreen window', async () => {
const [w, webview] = await loadWebViewWindow();
Expand All @@ -478,8 +478,9 @@ describe('<webview> tag', function () {
expect(w.isFullScreen()).to.be.false();
});

// Sending ESC via sendInputEvent only works on Windows.
ifit(process.platform === 'win32')('pressing ESC should unfullscreen window', async () => {
// FIXME: Fullscreen events do not work on Linux.
// This test is flaky on arm64 macOS.
ifit(process.platform !== 'linux' && process.arch !== 'arm64')('pressing ESC should unfullscreen window', async () => {
const [w, webview] = await loadWebViewWindow();
const enterFullScreen = emittedOnce(w, 'enter-full-screen');
await webview.executeJavaScript('document.getElementById("div").requestFullscreen()', true);
Expand All @@ -492,7 +493,8 @@ describe('<webview> tag', function () {
expect(w.isFullScreen()).to.be.false();
});

it('pressing ESC should emit the leave-html-full-screen event', async () => {
// This test is flaky on arm64 macOS.
ifit(process.platform !== 'darwin' || process.arch !== 'arm64')('pressing ESC should emit the leave-html-full-screen event', async () => {
const w = new BrowserWindow({
show: false,
webPreferences: {
Expand Down

0 comments on commit 5fc761d

Please sign in to comment.