summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 0dc1259..7dedc70 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -150,6 +150,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
BindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
BindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled);
BindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
+ BindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
// The fallback method is called when an unknown method is invoked.
BindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -440,6 +441,12 @@ void LayoutTestController::Reset() {
if (shell_) {
shell_->webView()->setZoomLevel(false, 0);
shell_->webView()->setTabKeyCyclesThroughElements(true);
+#if defined(OS_LINUX)
+ // (Constants copied because we can't depend on the header that defined
+ // them from this file.)
+ shell_->webView()->setSelectionColors(
+ 0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232);
+#endif // defined(OS_LINUX)
}
dump_as_text_ = false;
dump_editing_callbacks_ = false;
@@ -1081,3 +1088,10 @@ void LayoutTestController::evaluateInWebInspector(const CppArgumentList& args,
shell_->dev_tools_agent()->evaluateInWebInspector(args[0].ToInt32(),
args[1].ToString());
}
+
+void LayoutTestController::forceRedSelectionColors(const CppArgumentList& args,
+ CppVariant* result) {
+ result->SetNull();
+ shell_->webView()->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000,
+ 0xffc0c0c0);
+}