void InjectedBundle::beginTesting(WKDictionaryRef settings) { m_state = Testing; m_pixelResult.clear(); m_repaintRects.clear(); m_stringBuilder->clear(); m_testRunner = TestRunner::create(); m_gcController = GCController::create(); m_eventSendingController = EventSendingController::create(); m_textInputController = TextInputController::create(); m_accessibilityController = AccessibilityController::create(); WKBundleSetShouldTrackVisitedLinks(m_bundle, false); WKBundleRemoveAllVisitedLinks(m_bundle); WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true); WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true); WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false); WKBundleSwitchNetworkLoaderToNewTestingSession(m_bundle); WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true); WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false); WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9); WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval) WKBundleSetSpatialNavigationEnabled(m_bundle, m_pageGroup, false); WKBundleSetAllowFileAccessFromFileURLs(m_bundle, m_pageGroup, true); WKBundleSetPluginsEnabled(m_bundle, m_pageGroup, true); WKBundleSetPopupBlockingEnabled(m_bundle, m_pageGroup, false); WKBundleRemoveAllUserContent(m_bundle, m_pageGroup); m_testRunner->setShouldDumpFrameLoadCallbacks(booleanForKey(settings, "DumpFrameLoadDelegates")); m_testRunner->setUserStyleSheetEnabled(false); m_testRunner->setXSSAuditorEnabled(false); m_testRunner->setCloseRemainingWindowsWhenComplete(false); m_testRunner->setAcceptsEditing(true); m_testRunner->setTabKeyCyclesThroughElements(true); page()->prepare(); WKBundleClearAllDatabases(m_bundle); WKBundleClearApplicationCache(m_bundle); WKBundleResetOriginAccessWhitelists(m_bundle); WKBundleSetDatabaseQuota(m_bundle, 5 * 1024 * 1024); }
void LayoutTestController::setDatabaseQuota(uint64_t quota) { return WKBundleSetDatabaseQuota(InjectedBundle::shared().bundle(), quota); }
void TestRunner::setDatabaseQuota(uint64_t quota) { return WKBundleSetDatabaseQuota(InjectedBundle::singleton().bundle(), quota); }