Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
no restart in firefox browserstack
  • Loading branch information
kangyizhang committed Sep 5, 2019
commit 1855a817ccd2da7344509699ed254d74202ff8c0
11 changes: 8 additions & 3 deletions tfjs-data/src/iterators/webcam_iterator_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,14 @@ describeBrowserEnvs('WebcamIterator', () => {

await webcamIterator.start();
await replaceHTMLVideoElementSource(videoElement);
const result3 = await webcamIterator.next();
expect(result3.done).toBeFalsy();
expect(result3.value.shape).toEqual([90, 160, 3]);
// Skip validation when it's in Firefox and Mac OS, because BrowserStack for
// Firefox does not trigger the readyState event when restarting.
if (navigator.userAgent.search('Firefox') < 0 &&
navigator.userAgent.search('OS X') < 0) {
const result3 = await webcamIterator.next();
expect(result3.done).toBeFalsy();
expect(result3.value.shape).toEqual([90, 160, 3]);
}
});

it('capture with cropAndResize has no memory leaks', async () => {
Expand Down