summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 22:16:35 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 22:16:35 +0200
commitee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6 (patch)
treef4e2982b0d8f0484e2f261aebf0cccfc7b5ce9f5
parentf5545f8af22ce7199b0b82cc10989b31ecfdec01 (diff)
downloadUXP-ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6.tar
UXP-ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6.tar.gz
UXP-ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6.tar.lz
UXP-ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6.tar.xz
UXP-ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6.zip
Revert "Bug 1182569: Update tests when converting docshell loads to use AynscOpen2"
This reverts commit b73225e886f84182384a2b5b09f83e51501bdc38.
-rw-r--r--dom/base/test/file_simplecontentpolicy.js1
-rw-r--r--dom/plugins/test/mochitest/test_bug813906.html22
2 files changed, 5 insertions, 18 deletions
diff --git a/dom/base/test/file_simplecontentpolicy.js b/dom/base/test/file_simplecontentpolicy.js
index 2727b9530..1f9606c49 100644
--- a/dom/base/test/file_simplecontentpolicy.js
+++ b/dom/base/test/file_simplecontentpolicy.js
@@ -39,6 +39,7 @@ var policy = {
{
// Remember last content type seen for the test url
if (contentLocation.spec.endsWith(urlSuffix)) {
+ assert.ok(frame === browserElement, "correct <browser> element");
sendAsyncMessage("shouldLoad", {contentType: contentType, isTopLevel: isTopLevel});
return Ci.nsIContentPolicy.REJECT_REQUEST;
}
diff --git a/dom/plugins/test/mochitest/test_bug813906.html b/dom/plugins/test/mochitest/test_bug813906.html
index d18dbbff2..04c34daaf 100644
--- a/dom/plugins/test/mochitest/test_bug813906.html
+++ b/dom/plugins/test/mochitest/test_bug813906.html
@@ -18,35 +18,21 @@ function f() {
</script>
<script type="application/javascript">
-SimpleTest.requestFlakyTimeout(
- "Blocking an iframe does not cause the onerror event to be fired");
-
SimpleTest.waitForExplicitFinish();
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
var frameLoadCount = 0;
-
-function frameNavBlocked() {
- isnot(SpecialPowers.wrap(window.frame1).location.href.indexOf('chrome://'),
- 0, 'plugin shouldnt be able to cause navigation to chrome URLs');
- SimpleTest.finish();
-}
-
function frameLoaded() {
frameLoadCount++;
if (frameLoadCount == 1) {
document.getElementsByTagName("object")[0].type = "application/x-test";
document.getElementsByTagName("use")[0].setAttributeNS("http://www.w3.org/1999/xlink", "href", location.href + "#a");
-
- // wait two seconds and verify that frame navigation did not succeed
- setTimeout(frameNavBlocked, 2000);
- return;
+ } else if (frameLoadCount == 2) {
+ isnot(SpecialPowers.wrap(window.frame1).location.href.indexOf('chrome://'),
+ 0, 'plugin shouldnt be able to cause navigation to chrome URLs');
+ SimpleTest.finish();
}
- // we should never get here, but just in case, make sure the test fails in that case.
- ok(false, "onload() event should not fire for blocked navigation");
- SimpleTest.finish();
}
-
</script>
<!-- Note that <svg:use> ends up creating an anonymous subtree, which means that the plugin