2011-11-21 01:08:33 +04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Test for WebSMS</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for WebSMS **/
|
|
|
|
|
|
|
|
function checkInterface(aInterface) {
|
|
|
|
ok(!(aInterface in window), aInterface + " should be prefixed");
|
|
|
|
ok(("Moz" + aInterface) in window, aInterface + " should be prefixed");
|
|
|
|
}
|
|
|
|
|
|
|
|
checkInterface("SmsManager");
|
|
|
|
checkInterface("NavigatorSms");
|
|
|
|
|
2011-11-21 02:23:20 +04:00
|
|
|
ok('mozSms' in navigator, "navigator.mozSms should exist");
|
|
|
|
|
|
|
|
ok(navigator.mozSms, "navigator.mozSms returns an object");
|
|
|
|
|
|
|
|
ok(navigator.mozSms instanceof MozSmsManager, "navigator.mozSms is an SmsManager object");
|
|
|
|
|
2011-11-21 01:08:33 +04:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|