mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1321222 - Remove legacy generator from js/xpconnect/. r=mrbkap
This commit is contained in:
parent
5931477b72
commit
10515acfd3
@ -21,7 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=853571
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
const Cu = Components.utils;
|
||||
|
||||
function mainTest() {
|
||||
function* mainTest() {
|
||||
var iwin = $('ifr').contentWindow;
|
||||
|
||||
// Test with a simple sandbox with no prototype.
|
||||
@ -46,9 +46,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=853571
|
||||
target.addEventListener("message", function listener(event) {
|
||||
target.removeEventListener("message", listener);
|
||||
is(event.source, expectedSource, message);
|
||||
try {
|
||||
gen.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
let {done} = gen.next();
|
||||
if (done) {
|
||||
// We're done.
|
||||
}
|
||||
});
|
||||
|
@ -18,7 +18,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=505915
|
||||
<script type="application/javascript;version=1.7">
|
||||
|
||||
/** Test for Bug 505915 **/
|
||||
window.addEventListener("message", function () { gen.next() }, false);
|
||||
window.addEventListener("message", function () {
|
||||
ok(false, "should not receive message");
|
||||
}, false);
|
||||
|
||||
function go() {
|
||||
var ifr = $('ifr');
|
||||
@ -36,7 +38,6 @@ function go() {
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
yield;
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
@ -44,7 +45,7 @@ SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</pre>
|
||||
|
||||
<iframe id="ifr" onload="gen = go(); gen.next();" src="http://example.org/"></iframe>
|
||||
<iframe id="ifr" onload="go();" src="http://example.org/"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user