1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/plugins/test/mochitest/test_queryContentsScaleFactor.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +<html> 1.5 +<head> 1.6 + <title>NPAPI NPNVcontentsScaleFactor Test</title> 1.7 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.8 + <script type="application/javascript" src="utils.js"></script> 1.9 +</head> 1.10 + 1.11 +<body onload="runTests()"> 1.12 + <script class="testbody" type="application/javascript"> 1.13 + SimpleTest.waitForExplicitFinish(); 1.14 + setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); 1.15 + 1.16 + function runTests() { 1.17 + var pluginElement = document.getElementById("plugin"); 1.18 + var contentsScaleFactor; 1.19 + var exceptionThrown = false; 1.20 + try { 1.21 + contentsScaleFactor = pluginElement.queryContentsScaleFactor(); 1.22 + } catch (e) { 1.23 + exceptionThrown = true; 1.24 + } 1.25 + is(exceptionThrown, false, "Exception thrown getting contents scale factor."); 1.26 + is(isNaN(contentsScaleFactor), false, "Invalid return getting contents scale factor"); 1.27 + SimpleTest.finish(); 1.28 + } 1.29 + </script> 1.30 + 1.31 + <embed id="plugin" type="application/x-test" width="400" height="400"></embed> 1.32 +</body> 1.33 +</html>