Skip to content

Commit

Permalink
Add test for charLength in SpeechSynthesisEvent constructor (#15732)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdallst2 authored and foolip committed Mar 15, 2019
1 parent a22a149 commit 3531dc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions speech-api/SpeechSynthesisEvent-constructor.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
const event = new SpeechSynthesisEvent("type", {utterance: utterance});
assert_equals(event.utterance, utterance);
assert_equals(event.charIndex, 0);
assert_equals(event.charLength, 0);
assert_equals(event.elapsedTime, 0);
assert_equals(event.name, "");
}, "SpeechSynthesisEvent with eventInitDict having an utterance");
Expand All @@ -53,6 +54,7 @@
const event = new SpeechSynthesisEvent("type", {
utterance: utterance,
charIndex: 5,
charLength: 3,
elapsedTime: 100,
name: "foo"
});
Expand All @@ -61,6 +63,7 @@
assert_equals(event.type, "type");
assert_equals(event.utterance, utterance);
assert_equals(event.charIndex, 5);
assert_equals(event.charLength, 3);
assert_equals(event.elapsedTime, 100);
assert_equals(event.name, "foo");
}, "SpeechSynthesisEvent with custom eventInitDict");
Expand Down

0 comments on commit 3531dc2

Please sign in to comment.