|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -const {FFOX, CHROMIUM, WEBKIT, WIN, LINUX} = testOptions; |
| 17 | +const path = require('path'); |
| 18 | + |
| 19 | +const {FFOX, CHROMIUM, WEBKIT, WIN, LINUX, ASSETS_DIR} = testOptions; |
18 | 20 |
|
19 | 21 | describe('Capabilities', function() {
|
20 | 22 | it.fail(WEBKIT && WIN)('Web Assembly should work', async function({page, server}) {
|
@@ -47,8 +49,16 @@ describe('Capabilities', function() {
|
47 | 49 | await page.goto(server.EMPTY_PAGE);
|
48 | 50 | expect(await page.evaluate(() => window.testStatus)).toBe('SUCCESS');
|
49 | 51 | });
|
50 |
| - it.fail(WEBKIT && !LINUX)('should play video', async({page, server}) => { |
51 |
| - await page.goto(server.PREFIX + '/video.html'); |
| 52 | + it.fail(WEBKIT && WIN)('should play video', async({page}) => { |
| 53 | + // TODO: the test passes on Windows locally but fails on GitHub Action bot, |
| 54 | + // apparently due to a Media Pack issue in the Windows Server. |
| 55 | + // |
| 56 | + // Our test server doesn't support range requests required to play on Mac, |
| 57 | + // so we load the page using a file url. |
| 58 | + const url = WIN |
| 59 | + ? 'file:///' + path.join(ASSETS_DIR, 'video.html').replace(/\\/g, '/') |
| 60 | + : 'file://' + path.join(ASSETS_DIR, 'video.html'); |
| 61 | + await page.goto(url); |
52 | 62 | await page.$eval('video', v => v.play());
|
53 | 63 | await page.$eval('video', v => v.pause());
|
54 | 64 | });
|
|
0 commit comments