| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<title>doh.robot Tooltip Mouse Quirks Test</title> |
| 6 |
|
| 7 |
<style> |
| 8 |
@import "../../../../util/doh/robot/robot.css"; |
| 9 |
</style> |
| 10 |
|
| 11 |
|
| 12 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 13 |
|
| 14 |
<script language="JavaScript" type="text/javascript"> |
| 15 |
dojo.require("dojo._base.kernel"); |
| 16 |
dojo.require("dijit.robotx"); |
| 17 |
dojo.require("dijit.registry"); |
| 18 |
dojo.require("dijit.ready"); |
| 19 |
dojo.require("doh.runner"); |
| 20 |
dojo.require("dojox.mobile"); |
| 21 |
dojo.ready(function(){ |
| 22 |
doh.robot.initRobot("../test_SwapView.html"); |
| 23 |
var reg = null; |
| 24 |
|
| 25 |
doh.register("dojox.mobile.SwapView mouse tests", [ |
| 26 |
{ |
| 27 |
name: "SwapView mouse tests", |
| 28 |
timeout: 40000, |
| 29 |
runTest: function(){ |
| 30 |
var d = new doh.Deferred(); |
| 31 |
reg = kernel.global.dijit.registry; |
| 32 |
var dim = dojox.mobile.getScreenSize(); |
| 33 |
|
| 34 |
doh.robot.mouseMoveAt(reg.byId("dojox_mobile_SwapView_0").domNode, 1000,100, (dim.w -30),100); |
| 35 |
doh.robot.mousePress({left: true}, 1000); |
| 36 |
|
| 37 |
doh.robot.mouseMoveAt(reg.byId("dojox_mobile_SwapView_0").domNode, 1000,100,(dim.w -30)/2,0); |
| 38 |
|
| 39 |
doh.robot.mouseMoveAt(reg.byId("dojox_mobile_SwapView_0").domNode, 1000,100,10,100); |
| 40 |
doh.robot.mouseRelease({left: true}, 50); |
| 41 |
|
| 42 |
doh.robot.sequence(d.getTestCallback(function(){ |
| 43 |
doh.assertEqual("none", reg.byId("dojox_mobile_SwapView_0").domNode.style.display); |
| 44 |
doh.assertEqual("", reg.byId("dojox_mobile_SwapView_1").domNode.style.display); |
| 45 |
}), 1000); |
| 46 |
return d; |
| 47 |
} |
| 48 |
} |
| 49 |
]); |
| 50 |
doh.run(); |
| 51 |
}); |
| 52 |
</script> |
| 53 |
</head> |
| 54 |
<body /> |
| 55 |
</html> |