gecko-dev/testing/web-platform/tests/portals/portals-nested.html
Adithya Srinivasan 4663e06714 Bug 1535700 [wpt PR 15725] - Portals: Make Portal a WebContentsDelegate, a=testonly
Automatic update from web-platform-tests
Portals: Make Portal a WebContentsDelegate

This CL fixes a crash caused when nesting portals. The nested portal
tries to call a method on the delegate for its outer WebContents
(which is also a portal WebContents), but it doesn't have a delegate.
This is fixed by making the corresponding content::Portal a delegate
for a portal's WebContents.

Bug: 934942
Change-Id: I4909fce18fe01d160301277781b680fcde45a01a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504311
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639773}

--

wpt-commits: b071158cc5a331955b0dd8529efe62592aab8ed5
wpt-pr: 15725
2019-04-01 14:43:19 +01:00

20 lines
617 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
promise_test(() => {
var portal = document.createElement("portal");
portal.src = "resources/portals-nested-1.html";
document.body.appendChild(portal);
var waitForMessage = new Promise((resolve, reject) => {
var bc = new BroadcastChannel("portals-nested");
bc.onmessage = () => {
bc.close();
resolve();
}
});
return waitForMessage;
}, "nested portals shouldn't crash");
</script>
</body>