mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1675349: Update tests under testing/mochitest for the removal of plugins. r=jmathies
REMOVED ------- testing/mochitest/chrome/test_sanityPluginUtils.html Test the PluginUtils mochitest helper, which is now unused. Differential Revision: https://phabricator.services.mozilla.com/D95916
This commit is contained in:
parent
3805bd5a26
commit
eddf396ffe
@ -6,7 +6,6 @@ support-files = test-dir/test-file
|
||||
|
||||
[test_sample.xhtml]
|
||||
[test_sanityEventUtils.xhtml]
|
||||
[test_sanityPluginUtils.html]
|
||||
[test_sanityException.xhtml]
|
||||
[test_sanityException2.xhtml]
|
||||
[test_sanityManifest.xhtml]
|
||||
|
@ -1,38 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
var start = new Date();
|
||||
</script>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript">
|
||||
var loadTime = new Date();
|
||||
</script>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="starttest()">
|
||||
<!-- load the test plugin defined at $(DIST)/bin/plugins/Test.plugin/ -->
|
||||
<embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
|
||||
<script class="testbody" type="text/javascript">
|
||||
info("\nProfile::PluginUtilsLoadTime: " + (loadTime - start) + "\n");
|
||||
function starttest() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
var startTime = new Date();
|
||||
// increase the runtime of the test so it is detectible, otherwise we get 0-1ms
|
||||
let runtimes = 100;
|
||||
function runTest(plugin) {
|
||||
is(plugin.version, "1.0.0.0", "Make sure version is correct");
|
||||
is(plugin.name, "Test Plug-in");
|
||||
}
|
||||
while (runtimes > 0) {
|
||||
ok(PluginUtils.withTestPlugin(runTest), "Test plugin should be found");
|
||||
--runtimes;
|
||||
}
|
||||
var endTime = new Date();
|
||||
info("\nProfile::PluginUtilsRunTime: " + (endTime - startTime) + "\n");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -3315,25 +3315,6 @@ async function synthesizePlainDragAndCancel(
|
||||
return result;
|
||||
}
|
||||
|
||||
var PluginUtils = {
|
||||
withTestPlugin(callback) {
|
||||
var ph = _EU_Cc["@mozilla.org/plugin/host;1"].getService(
|
||||
_EU_Ci.nsIPluginHost
|
||||
);
|
||||
var tags = ph.getPluginTags();
|
||||
|
||||
// Find the test plugin
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
if (tags[i].name == "Test Plug-in") {
|
||||
callback(tags[i]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
todo(false, "Need a test plugin on this platform");
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
||||
class EventCounter {
|
||||
constructor(aTarget, aType, aOptions = {}) {
|
||||
this.target = aTarget;
|
||||
|
Loading…
Reference in New Issue
Block a user