module("tinymce.html.Serializer");
test('Basic serialization', function() {
var serializer = new tinymce.html.Serializer();
expect(6);
equal(serializer.serialize(new tinymce.html.DomParser().parse('texttext')), 'text');
equal(serializer.serialize(new tinymce.html.DomParser().parse('')), '');
equal(serializer.serialize(new tinymce.html.DomParser().parse('')), '');
equal(serializer.serialize(new tinymce.html.DomParser().parse('')), '');
equal(serializer.serialize(new tinymce.html.DomParser().parse('')), '');
});
test('Sorting of attributes', function() {
var serializer = new tinymce.html.Serializer();
expect(1);
equal(serializer.serialize(new tinymce.html.DomParser().parse('x')), 'x');
});
test('Serialize with validate: true, when parsing with validate:false bug', function() {
var schema = new tinymce.html.Schema({valid_elements: 'b'});
var serializer = new tinymce.html.Serializer({}, schema);
equal(
serializer.serialize(new tinymce.html.DomParser({validate: false}, schema).parse('ab')),
'ab'
);
});