Skip to content

Commit

Permalink
Adding a test to check loading of a disconnected HTML plugin
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271349
rdar://124083166

Reviewed by Ryosuke Niwa.

Adding a test to check loading of a disconnected HTML plugin.
This issue was fixed by checking 'isConnected' under HTMLPlugInImageElement::requestObject API.

* LayoutTests/fast/html/disconnected-html-plugin-expected.txt: Added.
* LayoutTests/fast/html/disconnected-html-plugin.html: Added.

Canonical link: https://commits.webkit.org/276567@main
  • Loading branch information
nishajain61 authored and rniwa committed Mar 22, 2024
1 parent a66494c commit 85534d1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LayoutTests/fast/html/disconnected-html-plugin-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This test passes if WebKit does not hit any debug assertions or crash.

PASS
28 changes: 28 additions & 0 deletions LayoutTests/fast/html/disconnected-html-plugin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<body onload="main()">
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}

function main() {
embed.type = "video/mp4";
let object = document.getElementById("object");
iframe.contentDocument.body.appendChild(object);
embed.height = "50%";
embed.type = "image/png";
container.prepend("A");
object.validity;
document.body.remove();
setTimeout(() => {
document.write("This test passes if WebKit does not hit any debug assertions or crash.<br><br>PASS");
if (window.testRunner)
testRunner.notifyDone();
}, 100);
}
</script>
<object id="object"></object>
<iframe id="iframe"></iframe>
<div id="container"><embed id="embed"></div>
</body>

0 comments on commit 85534d1

Please sign in to comment.