blob: e6736332fe36c24b5e8670da9c104e45bb9a1774 [file] [log] [blame]
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Tests the basic operation of DeviceProximity using the proximity.');
var firedEvent = {value: 2.2, min: 1.1, max: 3.3};
var deviceProximityEvent;
window.addEventListener('webkitdeviceproximity', function(e) {
deviceProximityEvent = e;
shouldBe('deviceProximityEvent.value', 'firedEvent.value');
shouldBe('deviceProximityEvent.min', 'firedEvent.min');
shouldBe('deviceProximityEvent.max', 'firedEvent.max');
finishJSTest();
});
internals.setDeviceProximity(document, 'webkitdeviceproximity', firedEvent.value, firedEvent.min, firedEvent.max);
window.jsTestIsAsync = true;
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>