module( 'plugins.paste' );

test( 'getClipboardData--ctrl+v', function() {
    var editor = new baidu.editor.Editor({'plugins':['paste']})
    var div = te.dom[0];
    editor.render( div );
    editor.focus();
    editor.setContent('<p></p>')
    var doc = editor.document;
    var r = new baidu.editor.dom.Range( doc );
    ZeroClipboard.setMoviePath( "ZeroClipboard.swf" );
    var clip = new ZeroClipboard.Client(); // 新建一个对象
//clip.setHandCursor( true ); // 设置鼠标为手型
clip.setText("哈哈"); // 设置要复制的文本。
var input = document.createElement('input');
    document.body.appendChild(input);
    input.id='input';
    clip.glue('input');
    ua.click(input);
    r.setStart(editor.body.firstChild,0).collapse(1).select();
//    editor.execCommand('paste');
//    ua.keypress(editor.body,{charCode:})
//    editor.body.fireEvent&&editor.body.fireEvent('onpaste')||editor.body.dispatchEvent&&editor.body.dispatchEvent('onpaste');
//    alert(editor.body.innerHTML);
//clip.glue("copy-botton"); // 和上一句位置不可调换
//    editor.setContent( '<p><span>xxxxx</span><strong><em>eeee</em></strong></p><div id="div_id" style="background:red">dddd</div><p>qwwww</p>' );
//    var div_new = doc.getElementById('test');
//    r.setStart( doc.body,0 ).collapse();
//var wsh=new ActiveXObject("WScript.Shell");
//wsh.SendKeys("abc123");
//    ua.keypress(doc.body,{which:65});
//    var position = ua.findPosition(div_new);
//    doc.onpaste = function(e){
//        e.clipboardData
//        ok(true,'');
//    }
//     stop();
//    ua.mousemove(div_new.firstChild,{clientX:position[0],clientY:position[1]});
//    editor.window.clipboardData.setData("text","new Clipboard data");
//    ua.keypress(editor.body,{ctrlKey:true,keyCode:86});
//        ua.keydown(doc,{ctrlKey:true,keyCode:86});
//    setTimeout(function(){
//        start();
//    },20);
} );