aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorElijah Manor <elijah.manor@gmail.com>2012-08-22 21:23:50 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-08-22 21:48:02 -0400
commit10901f7d9fa6be01cc6b88cd94d279760b42a069 (patch)
treefcfc002efd7c7f13c3689c007da2290cea58b22d /test/data
parentae1d2b3173876e7062324aa61398fef9d0f59f79 (diff)
downloadjquery-10901f7d9fa6be01cc6b88cd94d279760b42a069.tar.gz
jquery-10901f7d9fa6be01cc6b88cd94d279760b42a069.zip
Fix #12266. IE9/10 says document[0] is document.frames[0]? Close gh-903.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/manipulation/iframe-denied.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/data/manipulation/iframe-denied.html b/test/data/manipulation/iframe-denied.html
new file mode 100644
index 000000000..f2e3e83a4
--- /dev/null
+++ b/test/data/manipulation/iframe-denied.html
@@ -0,0 +1,36 @@
+<!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" ),
+ src = "http://google.com",
+ 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 : "" )
+ });
+ });
+ </script>
+ </body>
+</html>