dijit
Version:
Dijit provides a complete collection of user interface controls based on Dojo, giving you the power to create web applications that are highly optimized for usability, performance, internationalization, accessibility, but above all deliver an incredible u
68 lines (54 loc) • 1.62 kB
HTML
<html>
<head>
<title>doh.robot Editor IE9 in IE8 Compat Mode Test</title>
<style>
@import "../../../../util/doh/robot/robot.css";
</style>
<script type="text/javascript" src="../../../../dojo/dojo.js"></script>
<script type="text/javascript">
require([
"doh/runner", "dojo/robotx", "dojo/keys", "dojo/window", "dijit/tests/helpers", "dojo/domReady!"
], function(doh, robot, keys, winUtils, helpers){
robot.initRobot('../Editor_IE8Compat.html');
var editor1;
var registry;
doh.register("setup", [
{
name: "wait for editors to load",
timeout: 5000,
runTest: helpers.waitForLoad
},
function setVars(){
registry = robot.window.require("dijit/registry");
editor1 = registry.byId("editor1");
}
]);
doh.register("general", [
{
name: "general",
timeout: 15000,
runTest: function(){
var d = new doh.Deferred();
winUtils.scrollIntoView(editor1.domNode);
// Set contents of editor1
robot.sequence(d.getTestErrback(function(){
editor1.focus();
}), 500);
robot.typeKeys("hello", 500, 750);
robot.keyPress(keys.ENTER, 500);
robot.typeKeys("world", 500, 1650);
robot.sequence(d.getTestCallback(function(){
var val = editor1.get('value').replace(/[\s\xA0]+/g, "").toLowerCase();
doh.is("hello<br/>world", val);
}), 500);
return d;
}
}
]);
doh.run();
});
</script>
</head>
</html>