From 6d2e52ab83f41ad77d3f347e7c000eb389be7e0f Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Fri, 19 Jun 2020 15:09:25 -0400 Subject: [PATCH] test: skip requestPictureInPicture test if API isn't available (#6719) --- test/unit/player.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/player.test.js b/test/unit/player.test.js index 30cb31c4a..1e731ef44 100644 --- a/test/unit/player.test.js +++ b/test/unit/player.test.js @@ -2259,7 +2259,9 @@ QUnit.test('Should accept multiple calls to currentTime after player initializat assert.equal(player.currentTime(), 800, 'The last value passed is stored as the currentTime value'); }); -QUnit.test('Should only allow requestfullscreen if the tech supports it', function(assert) { +const testOrSkip = 'pictureInPictureEnabled' in document ? 'test' : 'skip'; + +QUnit[testOrSkip]('Should only allow requestPictureInPicture if the tech supports it', function(assert) { const player = TestHelpers.makePlayer({}); let count = 0;