haikuwebkit/LayoutTests/resources/plugin.js

22 lines
609 B
JavaScript
Raw Permalink Normal View History

Roll r168668 back in. <https://bugs.webkit.org/show_bug.cgi?id=132621> Reviewed by Brent Fulgham. Source/WebCore: Tests: fast/events/beforeload-assertion.html fast/events/beforeload-iframe-crash.html fast/events/beforeload-input-time-crash.html * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::updateLayoutIgnorePendingStylesheets): * dom/Document.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::renderWidgetForJSBindings): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::renderWidgetForJSBindings): * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::reset): (WebCore::FrameView::updateEmbeddedObjectsTimerFired): (WebCore::FrameView::flushAnyPendingPostLayoutTasks): (WebCore::FrameView::performPostLayoutTasks): * page/FrameView.h: * testing/Internals.cpp: (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): * testing/Internals.h: * testing/Internals.idl: Source/WebKit: * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: LayoutTests: * compositing/plugins/composited-plugin.html: * compositing/plugins/no-backing-store.html: * fast/dom/beforeload/flash-before-load.html: * fast/events/beforeload-assertion-expected.txt: Added. * fast/events/beforeload-assertion.html: Added. * fast/events/beforeload-iframe-crash-expected.txt: Added. * fast/events/beforeload-iframe-crash.html: Added. * fast/events/beforeload-input-time-crash-expected.txt: Added. * fast/events/beforeload-input-time-crash.html: Added. * http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html: * http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html: * http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html: * http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html: * http/tests/security/contentSecurityPolicy/object-src-none-allowed.html: * http/tests/security/contentSecurityPolicy/object-src-none-blocked.html: * http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js: (testImpl.iframe.onload): (testImpl): * http/tests/security/mixedContent/insecure-plugin-in-iframe.html: * platform/mac/plugins/supports-carbon-event-model.html: * platform/mac/plugins/testplugin-onnew-onpaint.html: * plugins/get-user-agent-with-null-npp-from-npp-new.html: * plugins/mouse-click-plugin-clears-selection.html: * plugins/netscape-plugin-map-data-to-src.html: * plugins/no-mime-with-valid-extension.html: * plugins/plugin-initiate-popup-window.html: * plugins/windowless_plugin_paint_test.html: * resources/plugin.js: Added. (runAfterPluginLoad): Canonical link: https://commits.webkit.org/151420@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-29 23:52:32 +00:00
// Wait for the load event, run post layout tasks, run the specified function,
// and notify the test runner that the test is done.
var NotifyDone = true;
var DoNotNotifyDone = false;
function runAfterPluginLoad(func, notifyDone, node) {
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', function() {
if (window.internals)
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(node);
if (func)
func();
if (notifyDone && window.testRunner)
testRunner.notifyDone();
}, false);
}