function continue_test() {
if (!gTestContinuation) {
gTestContinuation = test_body();
} var ret = gTestContinuation.next();
if (ret.done) {
testWin.done();
}
}
var gTestContinuation = null;
function continueAsync() {
setTimeout(function() { gTestContinuation.next(); })
}
function continueOnPopState() {
// Use continueAsync to avoid recursion within sync popstate listener.
window.addEventListener("popstate", continueAsync, { once: true });
}
function* test_basic_inner_navigation() {
// Navigate the inner frame a few times
yield loadContent(URL1);
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
yield loadContent(URL2);
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
// Test that history is working
window.history.back();
yield waitForLoad();
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
window.history.forward();
yield waitForLoad();
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
}
is(gState, "START", "State should be correct");
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
window.history.back();
continueAsync();
yield;
is(gState, "START", "State should be correct");
yield waitForLoad();
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
window.history.back();
continueAsync();
yield;
is(gState, "START", "State should be correct after going back twice");
yield waitForLoad();
is(gState, "START", "State should be correct");
is(getURL(), START, "URL should be correct");
is(getContent(), "Start", "Page should be correct");
}
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.