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

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 554004: GTK: Use GTK+ theme selection colors and plumb them into webkit. (Closed)
Patch Set: Move layout tests to correct paths Created 10 years, 11 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 | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/layout_test_controller.cc
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 9e36ada5759aa9de6254e6f844c76b68bb1b05ea..1a6c7bc7809542de5eac215de109f7bda4abc2d2 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -147,6 +147,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);
@@ -431,6 +432,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;
@@ -1055,3 +1062,9 @@ void LayoutTestController::evaluateInWebInspector(const CppArgumentList& args,
args[1].ToString());
}
+void LayoutTestController::forceRedSelectionColors(const CppArgumentList& args,
+ CppVariant* result) {
+ result->SetNull();
+ shell_->webView()->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000,
+ 0xffc0c0c0);
+}
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698