Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SetupHaltSpies( event ) {
- sinon.spy( event, "preventDefault" );
- sinon.spy( event, "stopPropagation" );
- };
- function AssertHaltEvent( assert, event ) {
- assert.ok( event.preventDefault.called, "the preventDefault method was not called for the " + event.name + "event");
- assert.ok( event.stopPropagation.called, "the stopPropagation method was not called for the " + event.name + "event");
- };
- function AssertHaltEventNotCalled( assert, event ) {
- assert.ok( event.preventDefault.notCalled, "the preventDefault method was called for the " + event.name + "event");
- assert.ok( event.stopPropagation.notCalled, "the stopPropagation method was called for the " + event.name + "event");
- };
- function CreateEditor( options ) {
- var editor = $("<div></div>").attr( "contenteditable", true );
- var wysiwyg = new window.Wysiwyg( editor, options );
- // This is required so that the editor is :visible
- editor.appendTo( document.body );
- return wysiwyg;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement