haikuwebkit/LayoutTests/quicklook/multi-sheet-numbers-09.html

27 lines
582 B
HTML
Raw Permalink Normal View History

REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets https://bugs.webkit.org/show_bug.cgi?id=175098 <rdar://problem/31416763> Reviewed by Daniel Bates. Source/WebCore: r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted frames within the sandbox from navigating their sandboxed siblings or ancestors, which breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews contain a frameset with a table of contents frame and a content frame, and the table of contents frame needs to be able to navigate the content frame when the sheet selection changes. Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the sandbox will be able to navigate each other, but will not be able to navigate the top frame (due to SandboxTopNavigation still being enabled), nor will they be able to navigate any other ancestor frame outside the sandbox (due to QuickLook previews being in a different origin than the hosting frame). These two cases are covered by existing tests. Test: quicklook/multi-sheet-numbers-09.html * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Added a call to disableSandboxFlags(SandboxNavigation) after applying the content security policy. * dom/SecurityContext.h: (WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags(). LayoutTests: * quicklook/multi-sheet-numbers-09-expected.txt: Added. * quicklook/multi-sheet-numbers-09.html: Added. * quicklook/resources/multi-sheet-numbers-09.numbers: Added. Canonical link: https://commits.webkit.org/191859@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-03 00:46:31 +00:00
<!DOCTYPE html>
<script src="../resources/ui-helper.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
function runTest()
{
UIHelper.activateAt(25, 35).then(() => {
window.setTimeout(() => {
testRunner.notifyDone();
}, 0);
});
}
</script>
<style>
iframe {
width: 100vw;
height: 100vh;
}
</style>
<iframe src="resources/multi-sheet-numbers-09.numbers" onload="runTest(this)"></iframe>