summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/speech-api/historical.html
blob: 99d2fab5f52654f21f6e8f76878b1a44722b101f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<title>Historical Speech API features</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
[
  "SpeechRecognitionError",
  "webkitSpeechGrammar",
  "webkitSpeechGrammarList",
  "webkitSpeechRecognition",
  "webkitSpeechRecognitionError",
  "webkitSpeechRecognitionEvent",
].forEach(name => {
  test(() => {
    assert_false(name in window);
  }, `${name} interface should not exist`);
});

test(() => {
  assert_implements('SpeechRecognition' in window, 'SpeechRecognition exposed');
  assert_false("serviceURI" in SpeechRecognition.prototype);
}, "SpeechRecognition's serviceURI attribute should not exist");

[
  "interpretation",
  "emma",
].forEach(name => {
  test(() => {
    assert_implements('SpeechRecognitionEvent' in window, 'SpeechRecognitionEvent exposed');
    assert_false(name in SpeechRecognitionEvent.prototype);
  }, `SpeechRecognitionEvent's ${name} attribute should not exist`);
});
</script>