haikuwebkit/ManualTests/print-after-window-close.html

10 lines
344 B
HTML
Raw Permalink Normal View History

<script>
function crash() {
2011-04-23 Alexey Proskuryakov <ap@apple.com> Unreviewed. REGRESSION (r80812): window.print();window.close() doesn't work in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=59241 <rdar://problem/9150861> * http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: * http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt: * http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt: Resource load delegates for cancelled loads are now correctly sent before frame load delegate's didFinishLoading, so cancellation errors get logged by DumpRenderTree. 2011-04-23 Alexey Proskuryakov <ap@apple.com> Reviewed by Maciej Stachowiak. REGRESSION (r80812): window.print();window.close() doesn't work in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=59241 <rdar://problem/9150861> Covered by manual-tests/print-after-window-close.html. Re-fixing <https://bugs.webkit.org/show_bug.cgi?id=51357> in a way that doesn't cause the regression. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didCancel): We shouldn't be doing complicated work while the loader is half-canceled. * manual-tests/print-after-window-close.html: Extended to actually print a non-empty page, thus being more practical. * page/Chrome.cpp: (WebCore::Chrome::print): Added a FIXME about a need for PageGroupLoadDeferrer. It's too scary for me to try now. * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): (WebCore::DOMWindow::finishedLoading): * page/DOMWindow.h: Reverted the previous fix for <https://bugs.webkit.org/show_bug.cgi?id=51357>. Canonical link: https://commits.webkit.org/74471@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-04-23 19:14:05 +00:00
var w = window.open("data:text/html,Loading a data URL is asynchronous, so this text shouldn't appear. But it's most important to check that there is no crash after dismissing the print sheet.");
w.document.write("SUCCESS");
w.print();
w.close();
}
</script>
<button onclick="crash()">Crash</button>