module("baidu.swf.create");


//error1  width and height only on IE 只有当设置width和height时，IE下才出来flash
test("width height", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	div.id = "div_id";
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
//		width:'100',
//		height:'100',
		align:'right',
		bgcolor:'#FFCC80'
	}, div);
	ok(true, "flash对象创建成功");
	start();
});
//error2  loop menu play都达不到应有的效果，wmode三个设置值好像没有区别
test("loop menu play wmode", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		width:'100',
		height:'100',
		loop:true,
		menu:true,
		play:true,
		wmode:"window"
	}, div);
	ok(true, "flash对象创建成功");
	start();
});
//error3  align='middle'达不到应有的效果
test("loop menu play wmode", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		width:'100',
		height:'100',
		align:'middle'
	}, div);
	ok(true, "flash对象创建成功");
	start();
});
//1、options.ver needed lower than existed flash version
test("ver errorMessage", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	div.id = "div_id";
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		width:'100',
		height:'100',
		ver:'6.0.0'
	}, div);
	ok(true, "flash对象创建成功");
	start();
});
//2、 There is no flash player or the version of existed flash is lower than needed&&errorMessage
test("ver errorMessage", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		ver:'11.0.0',
		errorMessage:"flash player 没安装或者版本低于需要的版本 "
	}, "div_id");
	start();
});
//3、There is no flash player or the version of existed flash is lower than needed&&!errorMessage
test("ver errorMessage", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		ver:'11.0.0',
	}, div);
	equal(div.innerHTML,'',"flash 对象没有创建成功");
	start();
});
//4、width height
test("ver errorMessage", function() {
	stop();
	var div = document.body.appendChild(document.createElement('div'));
	div.id = "div_id";
	baidu.swf.create({
		id : 'test1',
		url : "short1.swf",
		width:'900',
		height:'900'
	}, div);
	ok(true, "flash对象创建成功");
	start();
});
//5、There is no container(target)
test("options&&!container", function() {
stop();
var div = document.body.appendChild(document.createElement('div'));
baidu.swf.create({
	id : 'test1',
	url : "short1.swf",
	width : 100,
	height : 100
});
start();
});


@@ -802,24 +802,26 @@
 rt();%0D%0A%7D);%0D%0A
+//
 //error3  al
@@ -1131,16 +1131,18 @@
 ;%0D%0A%7D);%0D%0A
+//
 //1%E3%80%81opti
@@ -1196,32 +1196,24 @@
 %0D%0Atest(%22
-ver errorMessage
+test ver
 %22, funct
@@ -1485,16 +1485,18 @@
 ;%0D%0A%7D);%0D%0A
+//
 //2%E3%80%81 The
@@ -1798,16 +1798,28 @@
 essage:%22
+There is no 
 flash pl
@@ -1827,37 +1827,159 @@
 yer 
-%E6%B2%A1%E5%AE%89%E8%A3%85%E6%88%96%E8%80%85%E7%89%88%E6%9C%AC%E4%BD%8E%E4%BA%8E%E9%9C%80%E8%A6%81%E7%9A%84%E7%89%88%E6%9C%AC 
+or the version is too low
 %22%0D%0A%09%7D, 
-%22
 div
-_id
+);%0D%0A%09equal(div.innerHTML,%22There is no flash player or the version is too low%22,%22test option errorMessage successfully
 %22);%0D
@@ -1995,16 +1995,18 @@
 ;%0D%0A%7D);%0D%0A
+//
 //3%E3%80%81Ther
@@ -2097,32 +2097,35 @@
 sage%0D%0Atest(%22ver 
+no 
 errorMessage%22, f
@@ -2366,16 +2366,18 @@
 ;%0D%0A%7D);%0D%0A
+//
 //4%E3%80%81widt

修改baidu.swf.create