blob: bc85fe0586685f89aae9736a8cebc0ecd07a0eef [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Verify the user-agent string does not have the 'Simulator' device name.");
var userAgent = navigator.userAgent;
var isIPadUserAgent = userAgent.indexOf("Mozilla/5.0 (iPhone;") == 0;
var isIPhoneUserAgent = userAgent.indexOf("Mozilla/5.0 (iPad;") == 0;
function test(str, condition) {
var func = condition ? testPassed : testFailed;
func(str);
}
test('User agent platform should be "iPhone" or "iPad".', (isIPadUserAgent || isIPhoneUserAgent));
test('User agent does not contain "Simulator".', userAgent.indexOf("Simulator") < 0);
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>