mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 1675349: Update tests under dom/security/test for the removal of plugins. r=jmathies
UPDATED ------- dom/security/test/mixedcontentblocker/file_main.html Bug 62178 Test "insecure requests from a secure context". Switch to use image/png instead of application/x-test (test plugin) when testing <object> Differential Revision: https://phabricator.services.mozilla.com/D95911
This commit is contained in:
parent
90be6e1a12
commit
ed2fbf09ae
@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
|
||||
var object = document.createElement("object");
|
||||
var objectId = uniqueID();
|
||||
object.data = baseUrl + "?type=object" + uniqueIDParam(objectId);
|
||||
object.type = "application/x-test";
|
||||
object.type = "image/png";
|
||||
object.width = "200";
|
||||
object.height = "200";
|
||||
|
||||
@ -87,15 +87,17 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
|
||||
var objectCount = 0;
|
||||
|
||||
function objectStatus(object) {
|
||||
// Expose our privileged bits on the object
|
||||
// Expose our privileged bits on the object. We will match the MIME type to the one
|
||||
// provided by file_server.sjs
|
||||
object = SpecialPowers.wrap(object);
|
||||
|
||||
if (object.displayedType != SpecialPowers.Ci.nsIObjectLoadingContent.TYPE_NULL) {
|
||||
var typeIsSet = object.actualType && (object.actualType !== '');
|
||||
var isLoaded = typeIsSet && object.actualType === 'application/x-test-match';
|
||||
if (isLoaded) {
|
||||
//object loaded
|
||||
report("object", "insecure object loaded");
|
||||
}
|
||||
else {
|
||||
if(objectCount < MAX_COUNT) {
|
||||
if(!typeIsSet && objectCount < MAX_COUNT) {
|
||||
objectCount++;
|
||||
setTimeout(objectStatus, TIMEOUT_INTERVAL, object);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ function handleRequest(request, response)
|
||||
break;
|
||||
|
||||
case "object":
|
||||
response.setHeader("Content-Type", "application/x-test", false);
|
||||
response.setHeader("Content-Type", "application/x-test-match", false);
|
||||
break;
|
||||
|
||||
case "xhr":
|
||||
|
@ -11,8 +11,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script>
|
||||
SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
|
||||
|
||||
let counter = 0;
|
||||
// blockDisplay blockActive upgradeDisplay
|
||||
const settings = [
|
||||
|
Loading…
Reference in New Issue
Block a user