2013-03-22 00:23:46 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>NPAPI NPNVcontentsScaleFactor Test</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
2013-09-04 18:05:40 +04:00
|
|
|
<script type="application/javascript" src="utils.js"></script>
|
2013-03-22 00:23:46 +04:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="runTests()">
|
|
|
|
<script class="testbody" type="application/javascript">
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2013-09-04 18:05:40 +04:00
|
|
|
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
|
|
|
|
2013-03-22 00:23:46 +04:00
|
|
|
function runTests() {
|
|
|
|
var pluginElement = document.getElementById("plugin");
|
|
|
|
var contentsScaleFactor;
|
|
|
|
var exceptionThrown = false;
|
|
|
|
try {
|
|
|
|
contentsScaleFactor = pluginElement.queryContentsScaleFactor();
|
|
|
|
} catch (e) {
|
|
|
|
exceptionThrown = true;
|
|
|
|
}
|
|
|
|
is(exceptionThrown, false, "Exception thrown getting contents scale factor.");
|
|
|
|
is(isNaN(contentsScaleFactor), false, "Invalid return getting contents scale factor");
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
</script>
|
2013-09-04 18:05:40 +04:00
|
|
|
|
|
|
|
<embed id="plugin" type="application/x-test" width="400" height="400"></embed>
|
2013-03-22 00:23:46 +04:00
|
|
|
</body>
|
|
|
|
</html>
|