Debian Codegraph @

dijit/tests/editor/robot/Editor_IE8Compat.html

raw symbols SCIP
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 Editor IE9 in IE8 Compat Mode Test</title>
6
7 <style>
8 @import "../../../../util/doh/robot/robot.css";
9 </style>
10
11 <script type="text/javascript" src="../../../../dojo/dojo.js"></script>
12
13 <script type="text/javascript">
14 require([
15 "doh/runner", "dojo/robotx", "dojo/keys", "dojo/window", "dijit/tests/helpers", "dojo/domReady!"
16 ], function(doh, robot, keys, winUtils, helpers){
17
18 robot.initRobot('../Editor_IE8Compat.html');
19
20 var editor1;
21
22 var registry;
23 doh.register("setup", [
24 {
25 name: "wait for editors to load",
26 timeout: 5000,
27 runTest: helpers.waitForLoad
28 },
29 function setVars(){
30 registry = robot.window.require("dijit/registry");
31 editor1 = registry.byId("editor1");
32 }
33 ]);
34
35 doh.register("general", [
36 {
37 name: "general",
38 timeout: 15000,
39 runTest: function(){
40 var d = new doh.Deferred();
41 winUtils.scrollIntoView(editor1.domNode);
42
43 // Set contents of editor1
44 robot.sequence(d.getTestErrback(function(){
45 editor1.focus();
46 }), 500);
47 robot.typeKeys("hello", 500, 750);
48 robot.keyPress(keys.ENTER, 500);
49 robot.typeKeys("world", 500, 1650);
50
51 robot.sequence(d.getTestCallback(function(){
52 var val = editor1.get('value').replace(/[\s\xA0]+/g, "").toLowerCase();
53 doh.is("hello<br/>world", val);
54 }), 500);
55
56 return d;
57 }
58 }
59 ]);
60
61 doh.run();
62 });
63
64
65 </script>
66 </head>
67 </html>