Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: content/test/layouttest_support.cc

Issue 16026006: Introduce the notion of a "layout test mode" instead of turning individual flags on and off (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/renderer/shell_render_process_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index b60a161abafa0a681a6e930cf790134952f8bfc0..51141d3e0ee1eacd536844c0754d0a55962f152a 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -7,10 +7,8 @@
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "content/common/gpu/image_transport_surface.h"
-#include "content/renderer/devtools/devtools_client.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
-#include "content/renderer/renderer_webapplicationcachehost_impl.h"
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h"
#include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h"
@@ -60,27 +58,22 @@ void SetMockGamepads(const WebGamepads& pads) {
RendererWebKitPlatformSupportImpl::SetMockGamepadsForTesting(pads);
}
-void DisableAppCacheLogging() {
- RendererWebApplicationCacheHostImpl::DisableLoggingForTesting();
+void EnableRendererLayoutTestMode() {
+ RenderThreadImpl::current()->set_layout_test_mode(true);
}
-void EnableDevToolsFrontendTesting() {
- DevToolsClient::EnableDevToolsFrontendTesting();
-}
-
-int GetLocalSessionHistoryLength(RenderView* render_view) {
- return static_cast<RenderViewImpl*>(render_view)
- ->GetLocalSessionHistoryLengthForTesting();
-}
-
-void SetAllowOSMesaImageTransportForTesting() {
+void EnableBrowserLayoutTestMode() {
#if defined(OS_MACOSX)
ImageTransportSurface::SetAllowOSMesaForTesting(true);
+ PopupMenuHelper::DontShowPopupMenuForTesting();
+#elif defined(OS_WIN) && !defined(USE_AURA)
+ WebContentsDragWin::DisableDragDropForTesting();
#endif
}
-void DoNotSendFocusEvents() {
- RenderThreadImpl::current()->set_should_send_focus_ipcs(false);
+int GetLocalSessionHistoryLength(RenderView* render_view) {
+ return static_cast<RenderViewImpl*>(render_view)
+ ->GetLocalSessionHistoryLengthForTesting();
}
void SyncNavigationState(RenderView* render_view) {
@@ -92,10 +85,6 @@ void SetFocusAndActivate(RenderView* render_view, bool enable) {
->SetFocusAndActivateForTesting(enable);
}
-void EnableShortCircuitSizeUpdates() {
- RenderThreadImpl::current()->set_short_circuit_size_updates(true);
-}
-
void ForceResizeRenderView(RenderView* render_view,
const WebSize& new_size) {
RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view);
@@ -105,27 +94,11 @@ void ForceResizeRenderView(RenderView* render_view,
new_size.height));
}
-void DisableNavigationErrorPages() {
- RenderThreadImpl::current()->set_skip_error_pages(true);
-}
-
void SetDeviceScaleFactor(RenderView* render_view, float factor) {
static_cast<RenderViewImpl*>(render_view)
->SetDeviceScaleFactorForTesting(factor);
}
-void DisableSystemDragDrop() {
-#if defined(OS_WIN) && !defined(USE_AURA)
- WebContentsDragWin::DisableDragDropForTesting();
-#endif
-}
-
-void DisableModalPopupMenus() {
-#if defined(OS_MACOSX)
- PopupMenuHelper::DontShowPopupMenuForTesting();
-#endif
-}
-
void EnableAutoResizeMode(RenderView* render_view,
const WebSize& min_size,
const WebSize& max_size) {
« no previous file with comments | « content/shell/renderer/shell_render_process_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698