diff options
author | Steve Block <steveblock@google.com> | 2010-04-27 16:31:00 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:12 +0100 |
commit | dcc8cf2e65d1aa555cce12431a16547e66b469ee (patch) | |
tree | 92a8d65cd5383bca9749f5327fb5e440563926e6 /WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp | |
parent | ccac38a6b48843126402088a309597e682f40fe6 (diff) | |
download | external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2 |
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp')
-rw-r--r-- | WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index ddfca95..f9b40d1 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -84,6 +84,7 @@ static bool printSeparators; static bool leakChecking = false; static bool threaded = false; static bool forceComplexText = false; +static bool printSupportedFeatures = false; static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; volatile bool done; @@ -731,6 +732,11 @@ static bool shouldOpenWebInspector(const char* pathOrURL) return strstr(pathOrURL, "/inspector/") || strstr(pathOrURL, "\\inspector\\"); } +static bool shouldEnableDeveloperExtras(const char* pathOrURL) +{ + return shouldOpenWebInspector(pathOrURL) || strstr(pathOrURL, "/inspector-enabled/") || strstr(pathOrURL, "\\inspector-enabled\\"); +} + static void resetDefaultsToConsistentValues(IWebPreferences* preferences) { #ifdef USE_MAC_FONTS @@ -790,7 +796,7 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences) prefsPrivate->setExperimentalNotificationsEnabled(TRUE); prefsPrivate->setShouldPaintNativeControls(FALSE); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592> prefsPrivate->setXSSAuditorEnabled(FALSE); - prefsPrivate->setFrameSetFlatteningEnabled(FALSE); + prefsPrivate->setFrameFlatteningEnabled(FALSE); prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE); } setAlwaysAcceptCookies(false); @@ -836,7 +842,7 @@ static void resetWebViewToConsistentStateBeforeTesting() SetFocus(viewWindow); webViewPrivate->clearMainFrameName(); - webViewPrivate->resetOriginAccessWhiteLists(); + webViewPrivate->resetOriginAccessWhitelists(); BSTR groupName; if (SUCCEEDED(webView->groupName(&groupName))) { @@ -910,8 +916,11 @@ static void runTest(const string& testPathOrURL) resetWebViewToConsistentStateBeforeTesting(); - if (shouldOpenWebInspector(pathOrURL.c_str())) - gLayoutTestController->showWebInspector(); + if (shouldEnableDeveloperExtras(pathOrURL.c_str())) { + gLayoutTestController->setDeveloperExtrasEnabled(true); + if (shouldOpenWebInspector(pathOrURL.c_str())) + gLayoutTestController->showWebInspector(); + } prevTestBFItem = 0; if (webView) { @@ -947,7 +956,7 @@ static void runTest(const string& testPathOrURL) DispatchMessage(&msg); } - if (shouldOpenWebInspector(pathOrURL.c_str())) + if (shouldEnableDeveloperExtras(pathOrURL.c_str())) gLayoutTestController->closeWebInspector(); resetWebViewToConsistentStateBeforeTesting(); @@ -1222,6 +1231,11 @@ int main(int argc, char* argv[]) continue; } + if (!stricmp(argv[i], "--print-supported-features")) { + printSupportedFeatures = true; + continue; + } + tests.append(argv[i]); } @@ -1246,6 +1260,20 @@ int main(int argc, char* argv[]) standardPreferences->setJavaScriptEnabled(TRUE); standardPreferences->setDefaultFontSize(16); + if (printSupportedFeatures) { + BOOL acceleratedCompositingAvailable; + standardPreferences->acceleratedCompositingEnabled(&acceleratedCompositingAvailable); + BOOL threeDRenderingAvailable = +#if ENABLE(3D_RENDERING) + true; +#else + false; +#endif + + printf("SupportedFeatures:%s %s\n", acceleratedCompositingAvailable ? "AcceleratedCompositing" : "", threeDRenderingAvailable ? "3DRendering" : ""); + return 0; + } + COMPtr<IWebView> webView(AdoptCOM, createWebViewAndOffscreenWindow(&webViewWindow)); if (!webView) return -1; |