forked from jeresig/env-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revised iframe-behaviors spec to run in browser. Ported fixtures
for nexted-iframe testing, don't have most asserts yet.
- Loading branch information
Showing
14 changed files
with
184 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<!-- | ||
* This file is a component of env.js, | ||
* http://github.com/thatcher/env-js/ | ||
* a Pure JavaScript Browser Environment | ||
* Copyright 2010 John Resig, licensed under the MIT License | ||
* http://www.opensource.org/licenses/mit-license.php | ||
--> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | ||
lang="en" dir="ltr" id="html"> | ||
<head> | ||
<title>Content document for IFRAME loading in env.js unit test suite</title> | ||
</head> | ||
<body> | ||
<p id="aParaInAnIframe"> | ||
Here is a short paragraph in <code>iframe3.html</code>.</p> | ||
<p>Nesting level: <span id="nestingLevel">2</span></p> | ||
<!-- | ||
The preceding is the seed value for the automatic iframe-nesting | ||
count generation in <code>iframeN.html</code>, used by the nesting | ||
test in <code>../../scope/spec.js</code>. Value must be equal to the | ||
test's 'startingDepth' variable, minus 1, for things to work. | ||
--> | ||
|
||
<!-- matches code in iframeN.html --> | ||
<script> | ||
window.onload = function(){ | ||
var p = document.createElement('p'); | ||
p.setAttribute('id', "pCreatedIframeOnload" + | ||
window.top.numberNestedIframeLoads); | ||
var t = document.createTextNode("para window onload " + | ||
window.top.numberNestedIframeLoads); | ||
p.appendChild(t); | ||
document.getElementsByTagName('body')[0].appendChild(p); | ||
window.top.windowLoadCount++; | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iframeN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iframeN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iframeN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iframeN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iframeN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<!-- | ||
* This file is a component of env.js, | ||
* http://github.com/thatcher/env-js/ | ||
* a Pure JavaScript Browser Environment | ||
* Copyright 2010 John Resig, licensed under the MIT License | ||
* http://www.opensource.org/licenses/mit-license.php | ||
--> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | ||
lang="en" dir="ltr" id="html"> | ||
<head> | ||
<title>Document for testing arbitrary-depth IFRAME nesting in env.js</title> | ||
</head> | ||
<body onload="bodyOnloadHandler();"> | ||
<script> | ||
window.top.numberNestedIframeLoads++; | ||
window.onload = function(){ | ||
var p = document.createElement('p'); | ||
p.setAttribute('id', "pCreatedIframeOnload" + | ||
window.top.numberNestedIframeLoads); | ||
var t = document.createTextNode("para window onload " + | ||
window.top.numberNestedIframeLoads); | ||
p.appendChild(t); | ||
document.getElementsByTagName('body')[0].appendChild(p); | ||
window.top.windowLoadCount++; | ||
} | ||
</script> | ||
|
||
<!-- | ||
This document will be loaded into an IFRAME, and the following | ||
JavaScript finds an element in the parent document that contains | ||
the nesting level count, increments it, and then produces an | ||
identical element with the result in this document. | ||
--> | ||
|
||
<p>Nesting level: | ||
<script> | ||
var counterAsText = window.parent.document. | ||
getElementById('nestingLevel').innerHTML; | ||
var newCount = parseInt(counterAsText) + 1; | ||
document.write('\x3cspan id="nestingLevel"\x3e' + newCount + | ||
'\x3c/span\x3e'); | ||
</script> | ||
</p> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.