Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FBtest: fix for css/4543

  • Loading branch information...
commit 0649e7a36312d51f12858256a7560265933e7d6e 1 parent 563418b
@janodvarko janodvarko authored
View
10 tests/FBTest/content/FBTestFirebug.js
@@ -2789,4 +2789,14 @@ this.isInspectorActive = function()
};
// ********************************************************************************************* //
+// OS
+
+this.isMac = function()
+{
+ var hiddenWindow = Cc["@mozilla.org/appshell/appShellService;1"]
+ .getService(Ci.nsIAppShellService).hiddenDOMWindow;
+ return (hiddenWindow.navigator.platform.indexOf("Mac") >= 0);
+}
+
+// ********************************************************************************************* //
}).apply(FBTest);
View
6 tests/content/css/4543/issue4543.js
@@ -19,8 +19,12 @@ function runTest()
var editor = panel.panelNode.querySelector(".textEditorInner");
if (FBTest.ok(editor, "editor must be available now"))
{
+ // DOM_VK_HOME key doesn't work on Mac and we need to use DOM_VK_LEFT
+ // to move the cursor at the beginning of the inline editor.
+ var key = FBTest.isMac() ? "LEFT" : "HOME";
+ FBTest.sendKey(key, editor);
+
// Move text cursor between 'g' and 'b' of 'pngbase64'
- FBTest.sendKey("HOME", editor);
for (var i=0; i<19; i++)
FBTest.sendKey("RIGHT", editor);
Please sign in to comment.
Something went wrong with that request. Please try again.