editor.js revision e0b25dbc0322a078f384c45b48e5690f23d7eb15
YUI({
base: '../../../build/',
//filter: 'DEBUG',
filter: 'RAW',
logExclude: {
'YUI': true,
Event: true,
Base: true,
Attribute: true,
augment: true,
useConsole: true
}
width: '375px'
}).render();
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');
}
};
});