forked from mirrors/gecko-dev
Reviewers: nika Tags: #secure-revision Bug #: 1485643 Differential Revision: https://phabricator.services.mozilla.com/D4075 --HG-- extra : amend_source : 7d2a007b532ccd305852529ff23ffdbaffa3b621
31 lines
990 B
HTML
31 lines
990 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for DataTransfer moz* APIs</title>
|
|
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<script>
|
|
function run_test()
|
|
{
|
|
SpecialPowers.pushPrefEnv({"set": [
|
|
["dom.datatransfer.mozAtAPIs", false],
|
|
]}, function() {
|
|
let hiddenMethods = ["mozTypesAt", "mozClearDataAt", "mozGetDataAt", "mozSetDataAt", "mozItemCount"];
|
|
let exposedMethods = Object.getOwnPropertyNames(DataTransfer.prototype);
|
|
for (var idx in hiddenMethods) {
|
|
if (exposedMethods.includes(hiddenMethods[idx])) {
|
|
ok(false, hiddenMethods[idx] + " should not be exposed");
|
|
} else {
|
|
ok(true, hiddenMethods[idx] + " was not exposed");
|
|
}
|
|
}
|
|
SimpleTest.finish();
|
|
});
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addLoadEvent(run_test);
|
|
</script>
|