Closed Bug 1452117 Opened Last year Closed Last year

[wpt-sync] Sync PR 6618 - Verify that modals are blocked in sandboxed frames without 'allow-mod…

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 6618 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/w3c/web-platform-tests/pull/6618
Details from upstream follow.

Frédéric Wang <fwang@igalia.com> wrote:
>  Verify that modals are blocked in sandboxed frames without 'allow-mod…
>  
>  …als'.
>  
>  Writing tests for allow-modals seem a bit complicated because the modals dialog blocks the UI. I made various attempts with popups and so on, but that does not work consistently on the various web engines. I have not tried it, but I'm not sure how https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-allows-modals.php is supposed to work as it has similar assertions as sandbox-iframe-blocks-modals.php
>  
>  So for now I'm only adding tests to verify that modal dialogs return immediately when they are blocked. To handle the case where the browser incorrectly allow one of these dialogs, I used separate files and added some provision to ensure test failure.
>  
>  Gecko seems to return a boolean for window.print contrary to what the spec says.
>  
>  
>
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 4 tests and 4 subtests
OK     : 3
PASS   : 3
TIMEOUT: 2

New tests that have failures or other problems:
/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html: TIMEOUT
    Frames without `allow-modals` should not be able to open modal dialogs: TIMEOUT
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ada712c5ae9
[wpt PR 6618] - Verify that modals are blocked in sandboxed frames without 'allow-mod…, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/f53d396d769e
[wpt PR 6618] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/4ada712c5ae9
https://hg.mozilla.org/mozilla-central/rev/f53d396d769e
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.