Diff
Modified: trunk/LayoutTests/ChangeLog (91117 => 91118)
--- trunk/LayoutTests/ChangeLog 2011-07-15 22:10:47 UTC (rev 91117)
+++ trunk/LayoutTests/ChangeLog 2011-07-15 22:13:24 UTC (rev 91118)
@@ -1,3 +1,12 @@
+2011-07-15 Tony Chang <[email protected]>
+
+ [chromium] land linux selection color layout test
+ https://bugs.webkit.org/show_bug.cgi?id=64631
+
+ Reviewed by Ojan Vafai.
+
+ * platform/chromium-linux/editing/selection/linux_selection_color.html: Added.
+
2011-07-15 Vincent Scheib <[email protected]>
[chromium] updated test expectations.
Copied: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.png (from rev 91117, trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.png)
(Binary files differ)
Property changes: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.png
Added: svn:mime-type
Copied: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.txt (from rev 91117, trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.txt) (0 => 91118)
--- trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.txt 2011-07-15 22:13:24 UTC (rev 91118)
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {DIV} at (0,0) size 784x56
+ RenderBlock {P} at (0,0) size 784x20
+ RenderText {#text} at (0,0) size 458x19
+ text run at (0,0) width 458: "This tests that the methods that set selection colors for Linux work correctly."
+ RenderBlock {P} at (0,36) size 784x20
+ RenderText {#text} at (0,0) size 453x19
+ text run at (0,0) width 453: "(All the text in the above sentence should be highlighted red with green text)"
+selection start: position 1 of child 0 {#text} of child 1 {P} of child 1 {DIV} of body
+selection end: position 0 of child 3 {P} of child 1 {DIV} of body
Property changes: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color-expected.txt
Added: svn:eol-style
Added: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color.html (0 => 91118)
--- trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color.html (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color.html 2011-07-15 22:13:24 UTC (rev 91118)
@@ -0,0 +1,21 @@
+<html>
+<body>
+<div>
+<p id="text">
+This tests that the methods that set selection colors for Linux work correctly.
+</p>
+<p>(All the text in the above sentence should be highlighted red with green text)</p>
+</div>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.forceRedSelectionColors()
+}
+
+var div = document.getElementById("text");
+var sel = window.getSelection();
+var range = document.createRange();
+range.selectNode(div);
+sel.addRange(range);
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/platform/chromium-linux/editing/selection/linux_selection_color.html
___________________________________________________________________
Added: svn:eol-style
Deleted: trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.txt (91117 => 91118)
--- trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.txt 2011-07-15 22:10:47 UTC (rev 91117)
+++ trunk/LayoutTests/platform/chromium-linux/linux_selection_color-expected.txt 2011-07-15 22:13:24 UTC (rev 91118)
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x576
- RenderBlock {DIV} at (0,0) size 784x56
- RenderBlock {P} at (0,0) size 784x20
- RenderText {#text} at (0,0) size 458x19
- text run at (0,0) width 458: "This tests that the methods that set selection colors for Linux work correctly."
- RenderBlock {P} at (0,36) size 784x20
- RenderText {#text} at (0,0) size 453x19
- text run at (0,0) width 453: "(All the text in the above sentence should be highlighted red with green text)"
-selection start: position 1 of child 0 {#text} of child 1 {P} of child 1 {DIV} of body
-selection end: position 0 of child 3 {P} of child 1 {DIV} of body
Modified: trunk/Tools/ChangeLog (91117 => 91118)
--- trunk/Tools/ChangeLog 2011-07-15 22:10:47 UTC (rev 91117)
+++ trunk/Tools/ChangeLog 2011-07-15 22:13:24 UTC (rev 91118)
@@ -1,3 +1,20 @@
+2011-07-15 Tony Chang <[email protected]>
+
+ [chromium] land linux selection color layout test
+ https://bugs.webkit.org/show_bug.cgi?id=64631
+
+ Reviewed by Ojan Vafai.
+
+ I had removed this code in r76620 because I thought it wasn't used.
+ Turns out there was a layout test in the chromium tree that never
+ got migrated that used it. Re-add the code and land the layout
+ test (I will remove it from the chromium tree soon).
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::forceRedSelectionColors):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
2011-07-15 Dimitri Glazkov <[email protected]>
Revert http://trac.webkit.org/changeset/91091, since Python 2.5
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (91117 => 91118)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2011-07-15 22:10:47 UTC (rev 91117)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2011-07-15 22:13:24 UTC (rev 91118)
@@ -112,6 +112,7 @@
bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin);
bindMethod("execCommand", &LayoutTestController::execCommand);
+ bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker);
bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
@@ -1599,6 +1600,12 @@
m_shell->drtDevToolsAgent()->evaluateInWebInspector(arguments[0].toInt32(), arguments[1].toString());
}
+void LayoutTestController::forceRedSelectionColors(const CppArgumentList& arguments, CppVariant* result)
+{
+ result->setNull();
+ m_shell->webView()->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0);
+}
+
void LayoutTestController::addUserScript(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h (91117 => 91118)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h 2011-07-15 22:10:47 UTC (rev 91117)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h 2011-07-15 22:13:24 UTC (rev 91118)
@@ -334,6 +334,9 @@
// Allows layout tests to exec scripts at WebInspector side.
void evaluateInWebInspector(const CppArgumentList&, CppVariant*);
+ // Forces the selection colors for testing under Linux.
+ void forceRedSelectionColors(const CppArgumentList&, CppVariant*);
+
// Adds a user script or user style sheet to be injected into new documents.
void addUserScript(const CppArgumentList&, CppVariant*);
void addUserStyleSheet(const CppArgumentList&, CppVariant*);