mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
tests and resources for bug 100533.
This commit is contained in:
parent
a4e0713eea
commit
bcda6a0051
8
testing/mochitest/static/bug100533_iframe.html
Normal file
8
testing/mochitest/static/bug100533_iframe.html
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form method='get' action='/static/bug100533_load.html' id='b'><input type="submit"/></form>
|
||||
</body>
|
||||
</html>
|
14
testing/mochitest/static/bug100533_load.html
Normal file
14
testing/mochitest/static/bug100533_load.html
Normal file
@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
|
||||
<body onload="parent.submitted();">
|
||||
|
||||
<span id="foo"></span>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -44,6 +44,7 @@ if (!params.quiet) {
|
||||
var RunSet = {}
|
||||
RunSet.runall = function() {
|
||||
TestRunner.runTests(
|
||||
'test_bug100533.html',
|
||||
'test_bug218277.html',
|
||||
'test_bug302186.html',
|
||||
'test_bug338541.xhtml',
|
||||
|
44
testing/mochitest/tests/test_bug100533.html
Normal file
44
testing/mochitest/tests/test_bug100533.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=100533
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 100533</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=100533">Mozilla Bug 100533</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" >
|
||||
|
||||
<button id="thebutton">Test</button>
|
||||
<iframe style='display: none;' src='/static/bug100533_iframe.html' id='a'></iframe>
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/** Test for Bug 100533 **/
|
||||
var submitIframeForm = function() {
|
||||
$('a').contentDocument.getElementById('b').submit();
|
||||
}
|
||||
|
||||
submitted = function() {
|
||||
ok(true, "Finished. Form submits when located in iframe set to display:none;");
|
||||
SimpleTest.finish();
|
||||
};
|
||||
|
||||
addLoadEvent(function() {
|
||||
connect("thebutton", "click", submitIframeForm);
|
||||
signal("thebutton", "click");
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user