One unit test is still failing: WindowCreator. Oof. Threading problem.
M webclient/build.xml - separate out "compile.binaries" target M webclient/classes_spec/org/mozilla/mcp/MCP.java - account for mac coordinate wierdness. M webclient/src_moz/AjaxListener.cpp M webclient/src_moz/CBrowserContainer.cpp M webclient/src_moz/EmbedEventListener.cpp M webclient/src_moz/ns_util.h - make sure to initialize the buffer before calling WC_ITOA M webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java - Make these tests run M webclient/test/automated/src/test/HistoryTest0.html - add an ID. M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java - print out coordinates git-svn-id: svn://10.0.0.236/trunk@228024 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: MCP.java,v 1.11 2007-06-13 16:57:17 edburns%acm.org Exp $
|
||||
* $Id: MCP.java,v 1.12 2007-06-14 02:03:33 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -516,16 +516,16 @@ public class MCP {
|
||||
*/
|
||||
|
||||
public void clickElement(Element element) {
|
||||
String clientX = null, clientY = null;
|
||||
String screenX = null, screenY = null;
|
||||
String id = element.getAttribute("id");
|
||||
if (null != element) {
|
||||
clientX = element.getAttribute("clientX");
|
||||
clientY = element.getAttribute("clientY");
|
||||
screenX = element.getAttribute("screenX");
|
||||
screenY = element.getAttribute("screenY");
|
||||
int x,y;
|
||||
if (null != clientX && null != clientY) {
|
||||
if (null != screenX && null != screenY) {
|
||||
try {
|
||||
x = Integer.valueOf(clientX).intValue();
|
||||
y = Integer.valueOf(clientY).intValue();
|
||||
x = Integer.valueOf(screenX).intValue();
|
||||
y = Integer.valueOf(screenY).intValue() - 5;
|
||||
Robot robot = getRobot();
|
||||
robot.mouseMove(x, y);
|
||||
robot.mousePress(InputEvent.BUTTON1_MASK);
|
||||
@@ -540,7 +540,7 @@ public class MCP {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == element || null == clientX || null == clientY) {
|
||||
if (null == element || null == screenX || null == screenY) {
|
||||
throw new IllegalStateException("Unable to click element " + id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user