2015-09-20 Alexey Proskuryakov <ap@apple.com>
+ WebKitTestRunner can leak user content script results between tests
+ https://bugs.webkit.org/show_bug.cgi?id=149391
+
+ Reviewed by Sam Weinig.
+
+ Move WKBundlePageRemoveAllUserContent call so that it's executed before loading
+ about:blank, and thus about:blank doesn't have unintended side effects.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::resetAfterTest):
+
+2015-09-20 Alexey Proskuryakov <ap@apple.com>
+
[Mac, iOS] AccessibilityController doesn't uninstall global notification handler
https://bugs.webkit.org/show_bug.cgi?id=149384
WKBundleSetPluginsEnabled(m_bundle, m_pageGroup, true);
WKBundleSetPopupBlockingEnabled(m_bundle, m_pageGroup, false);
- WKBundlePageRemoveAllUserContent(page()->page());
-
#if PLATFORM(IOS)
WKBundlePageSetUseTestingViewportConfiguration(page()->page(), !booleanForKey(settings, "UseFlexibleViewport"));
#endif
JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame);
WebCoreTestSupport::resetInternalsObject(context);
assignedUrlsCache.clear();
+
+ // User scripts need to be removed after the test and before loading about:blank, as otherwise they would run in about:blank, and potentially leak results into a subsequest test.
+ WKBundlePageRemoveAllUserContent(m_page);
}
// Loader Client Callbacks