Debian Codegraph @

dojox/editor/tests/robot/Editor_Smiley.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 Smiley Plugin Test</title>
6
7 <style>
8 @import "../../../../util/doh/robot/robot.css";
9 </style>
10
11 <!-- required: dojo.js -->
12 <script type="text/javascript" src="../../../../dojo/dojo.js"
13 data-dojo-config="isDebug: true, parseOnLoad: true"></script>
14
15 <script type="text/javascript">
16 dojo.require("dijit.robotx");
17 dojo.require("dijit.tests.helpers"); // functions to help test
18
19 dojo.addOnLoad(function(){
20 doh.robot.initRobot('../editorSmileyPlugin.html');
21
22 var editor;
23 var value;
24
25 doh.register("SmileyPlugin_tests", [
26 {
27 //
28 name: "Smiley preFilter test",
29 timeout: 20000,
30 setUp: function(){
31 editor = dijit.byId("editor");
32 value = editor.attr("value");
33 },
34 runTest: function(){
35 var d = new doh.Deferred();
36
37 try{
38 doh.robot.sequence(d.getTestCallback(function(){
39 //
40 // check smiley icon count
41 var nodes = dojo.query("img ", editor.editNode);
42 doh.assertEqual(20, nodes.length, editor.editNode.innerHTML);
43 }), 1000);
44 }catch(e){
45 d.errback(e);
46 }
47 return d;
48 },
49 tearDown: function(){
50 if(editor){editor.attr("value", value);}
51 }
52 }
53 ]);
54 doh.run();
55 });
56 </script>
57 </head>
58 </html>