2012-08-23 01:23:50 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset=utf-8 />
|
|
|
|
<title>body</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="qunit-fixture"></div>
|
|
|
|
<script src="../../../dist/jquery.js"></script>
|
|
|
|
<script>
|
|
|
|
var script = document.getElementsByTagName( "script" )[ 0 ],
|
|
|
|
div = document.createElement( "div" ),
|
2012-11-01 21:32:08 +00:00
|
|
|
src = "http://" + window.parent.externalHost,
|
2012-08-23 01:23:50 +00:00
|
|
|
success = true,
|
|
|
|
error = "";
|
|
|
|
|
|
|
|
script.parentNode.appendChild( div );
|
|
|
|
div.innerHTML = "<iframe name=\"test\" src=\"" + src + "\">";
|
|
|
|
|
|
|
|
jQuery(function() {
|
|
|
|
try {
|
|
|
|
jQuery( "<div>hello<div>world</div>!</div>" ).appendTo( "#qunit-fixture" );
|
|
|
|
} catch( e ) {
|
|
|
|
success = false;
|
|
|
|
error = e;
|
|
|
|
}
|
|
|
|
|
|
|
|
window.parent.iframeCallback({
|
|
|
|
status: success,
|
|
|
|
description: "buildFragment sets the context without throwing an exception" +
|
|
|
|
( error ? ": " + error : "" )
|
|
|
|
});
|
|
|
|
});
|
2012-11-01 21:32:08 +00:00
|
|
|
</script>
|
2012-08-23 01:23:50 +00:00
|
|
|
</body>
|
|
|
|
</html>
|