Bug 195671 - [WPE][GTK] New WPT iframe sandbox tests failing
Summary: [WPE][GTK] New WPT iframe sandbox tests failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-13 06:22 PDT by Alicia Boya García
Modified: 2023-01-25 19:37 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2019-03-13 06:22:58 PDT
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads_without_user_activation.sub.tentative.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads_without_user_activation.sub.tentative.html

Probable cause:

There seems to be a problem accessing iframes within the test runner. The first of these tests actually pass in the minibrowser, whereas in the test runner `anchor` is undefined, making an unexpected failure:

var iframe = document.createElement("iframe");
iframe.srcdoc = "<a>Download</a>";
iframe.sandbox = "allow-same-origin allow-downloads-without-user-activation";
iframe.onload = t.step_func(function () {
    iframe.contentWindow.addEventListener(
        "unload", t.unreached_func("Unexpected navigation."));
    var anchor = iframe.contentDocument.getElementsByTagName('a')[0];
    // Set |finish-delay| to let the server stream a response over a  period
    // of time, so it's able to catch potential download cancellation by
    // detecting a socket close.
    anchor.href = "support/download_stash.py?token=" + token + "&finish-delay=" + StreamDownloadFinishDelay();
    anchor.click();
    AssertDownloadSuccess(t, token, StreamDownloadFinishDelay() + DownloadVerifyDelay());
});

document.body.appendChild(iframe);
Comment 1 Diego Pino 2023-01-25 19:36:59 PST
There are no references to this bug in any TestExpectations. It's probable this bug was solved at some point but it wasn't marked as closed. I'm closing this bug now. If you think this bug report is still valid, please reopen it and add an entry to TestExpectations.