Backout 776f008404bf (bug 771202) for mochitest-3 orange

This commit is contained in:
Ed Morley 2012-07-13 11:07:26 +01:00
Родитель 73c0e4e0c2
Коммит 14ce42d851
3 изменённых файлов: 0 добавлений и 78 удалений

Просмотреть файл

@ -64,8 +64,6 @@ MOCHITEST_FILES = \
test_propertyAndMethod.html \
test_bug539565-1.html \
test_bug539565-2.html \
test_bug771202.html \
file_bug771202.html \
test_enumerate.html \
test_npruntime_construct.html \
307-xo-redirect.sjs \

Просмотреть файл

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<embed id="pluginElement" type="application/x-test" width="200" height="200"></embed>
<marquee id="marqueeElement">Always on the move!</marquee>
</body>
</html>

Просмотреть файл

@ -1,67 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=771202
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 771202</title>
<script type="application/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=771202">Mozilla Bug 771202</a>
<pre id="test">
<script type="application/javascript">
/** Test for recreating spliced prototype chains (XBL and plugins) after
tranplant. **/
SimpleTest.waitForExplicitFinish();
function go() {
// Set things up.
var win = document.getElementById('ifr').contentWindow;
var plugin = win.document.getElementById('pluginElement');
var marquee = win.document.getElementById('marqueeElement');
var testValue = plugin.getObjectValue();
function checkPlugin() {
dump("About to call checkObjectValue\n");
ok(plugin.checkObjectValue(testValue), 'Plugin proto should work correctly');
}
// It's not great to depend on implementation details of the XBL-implemented
// <marquee> element here, but it's simpler than trying to rig up a custom XBL
// test binding here.
function checkMarquee() {
try {
is(marquee.behavior, 'scroll', 'XBL proto should work correctly');
} catch (e) {
ok(false, 'XBL proto broken');
}
}
// First, check things before transplanting.
checkPlugin();
checkMarquee();
// Adopt the plugin and retest.
document.body.appendChild(plugin);
checkPlugin();
// Adopt the marquee and retest. Note that the binding is applied
// asynchronously in this case, so we need to check asynchronously
// as well.
document.body.appendChild(marquee);
setTimeout(function() {
checkMarquee();
SimpleTest.finish();
}, 0);
}
</script>
</pre>
<iframe id="ifr" onload="go();" src="file_bug771202.html">
</body>
</html>