editor.js revision 6a6a6d5448f8c49592581707a20e891abe577bfa
var editor = null,
template = {
name: 'Editor Tests',
setUp : function() {
},
tearDown : function() {
},
test_load: function() {
},
test_frame: function() {
var iframeReady = false,
container: '#editor',
designMode: true,
content: 'This is a test.',
});
iframeReady = true;
});
this.wait(function() {
}, 1500);
},
test_editor: function() {
var iframeReady = false;
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
iframeReady = true;
});
});
this.wait(function() {
Y.Assert.areSame(Y.EditorBase.FILTER_RGB(inst.one('b').getStyle('color')), '#ff0000', 'Extra CSS Failed');
}, 1500);
},
test_window: function() {
Y.Assert.areEqual(Y.Node.getDOMNode(Y.one('#editor iframe').get('contentWindow')), Y.Node.getDOMNode(editor.getInstance().one('win')), 'Window object is not right');
},
test_doc: function() {
Y.Assert.areEqual(Y.Node.getDOMNode(Y.one('#editor iframe').get('contentWindow.document')), Y.Node.getDOMNode(editor.getInstance().one('doc')), 'Document object is not right');
},
test_destroy: function() {
},
test_br_plugin: function() {
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
},
test_para_plugin: function() {
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
},
test_double_plug_setup: function() {
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
},
test_double_plug: function() {
//This should error
},
test_double_down: function() {
},
test_double_plug_setup2: function() {
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
},
test_double_plug2: function() {
//This should error
},
test_double_down2: function() {
},
test_bidi_noplug: function() {
editor = new Y.EditorBase({
content: 'Hello <b>World</b>!!',
extracss: 'b { color: red; }'
});
this.wait(function() {
//This should error
}, 1500);
},
test_bidi_plug: function() {
sel.selectNode(b, true, true);
sel.selectNode(b, true, true);
sel.selectNode(b, true, true);
});
},
_should: {
error: { //These tests should error
test_double_plug: true,
test_double_plug2: true,
test_bidi_noplug: true
}
}
};
});