Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial migration of a subset of Google tests #3324

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
33 changes: 33 additions & 0 deletions encrypted-media/clearkey-check-initdata-type.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Successful Playback, Temporary session with DRM, mp4</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<!--<script src=/encrypted-media/content/content-metadata.js></script>-->

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/check-initdata-type.js></script>

</head>
<body>
<div id='log'></div>

<script>
var config = { keysystem: 'org.w3.clearkey' }

runTest(config);
</script>
</body>
</html>
42 changes: 42 additions & 0 deletions encrypted-media/clearkey-events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Events with Clear Key</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<script src=/encrypted-media/util/fetch.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/events.js></script>

</head>
<body>
<div id='log'></div>

<script>
getSupportedContent( 'org.w3.clearkey' )
.then( function( contents )
{
runTest( { keysystem: 'org.w3.clearkey',
content: contents[ 0 ],
messagehandler: messagehandler.bind( contents[ 0 ] ),
} );
} );
</script>
</body>
</html>
33 changes: 33 additions & 0 deletions encrypted-media/clearkey-generate-request-disallowed-input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Test handling of invalid initData for generateRequest()</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<script src=/encrypted-media/util/fetch.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/generate-request-disallowed-input.js></script>

</head>
<body>
<div id='log'></div>

<script>
var config = { keysystem: 'org.w3.clearkey'
};

runTest(config);

</script>
</body>
</html>
51 changes: 51 additions & 0 deletions encrypted-media/clearkey-keystatuses-multiple-sessions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Verify MediaKeySession.keyStatuses with multiple sessions, Clear Key</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/fetch.js></script>
<script src=/encrypted-media/util/testmediasource.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key keysystem -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/keystatuses-multiple-sessions.js></script>

</head>
<body>
<div id='log'></div>

<script>
getSupportedContent( 'org.w3.clearkey' )
.then( function( contents ) {

// Select a content item with multiple keys
var contentitem = contents.filter( function( item ) { return item.keys.length > 1; } )[ 0 ];

var config = { keysystem: 'org.w3.clearkey',
content: contentitem,
messagehandler: messagehandler.bind( contentitem ),
initDataType: 'keyids',
initData: getMultikeyInitDatas(contentitem,'keyids'),
};

runTest(config);

} );
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Successful Playback, persistent-usage-record session with Clear Key, mp4, event sequence</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/fetch.js></script>
<script src=/encrypted-media/util/testmediasource.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key keysystem -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/playback-persistent-usage-record-events.js></script>

</head>
<body>
<div id='log'></div>

<div id='video'>
<video id="videoelement" width="200px"></video>
</div>

<script>
var contentitem = content['mp4-basic'],
config = { video: document.getElementById('videoelement'),
keysystem: 'org.w3.clearkey',
messagehandler: messagehandler.bind( contentitem ),
audioPath: contentitem.audio.path,
videoPath: contentitem.video.path,
audioType: contentitem.audio.type,
videoType: contentitem.video.type,
initDataType: 'keyids',
initData: getInitData(contentitem,'keyids'),
duration: 2 };

runTest(config);
</script>
</body>
</html>
52 changes: 52 additions & 0 deletions encrypted-media/clearkey-mp4-playback-persistent-usage-record.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Successful Playback, persistent-usage-record session with Clear Key, mp4, event sequence</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/fetch.js></script>
<script src=/encrypted-media/util/testmediasource.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key keysystem -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/playback-persistent-usage-record.js></script>

</head>
<body>
<div id='log'></div>

<div id='video'>
<video id="videoelement" width="200px"></video>
</div>

<script>
var contentitem = content['mp4-basic'],
config = { video: document.getElementById('videoelement'),
keysystem: 'org.w3.clearkey',
messagehandler: messagehandler.bind( contentitem ),
audioPath: contentitem.audio.path,
videoPath: contentitem.video.path,
audioType: contentitem.audio.type,
videoType: contentitem.video.type,
initDataType: 'keyids',
initData: getInitData(contentitem,'keyids'),
duration: 2 };

runTest(config);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Successful Playback, persistent-usage-record session with Clear Key, mp4, event sequence</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/fetch.js></script>
<script src=/encrypted-media/util/testmediasource.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key keysystem -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/playback-retrieve-persistent-usage-record.js></script>

</head>
<body>
<div id='log'></div>

<div id='video'>
<video id="videoelement" width="200px"></video>
</div>

<script>
var contentitem = content['mp4-basic'],
config = { video: document.getElementById('videoelement'),
keysystem: 'org.w3.clearkey',
messagehandler: messagehandler.bind( contentitem ),
audioPath: contentitem.audio.path,
videoPath: contentitem.video.path,
audioType: contentitem.audio.type,
videoType: contentitem.video.type,
initDataType: 'keyids',
initData: getInitData(contentitem,'keyids'),
duration: 2,
windowscript: 'resources/retrieve-persistent-usage-record.html' };

runTest(config);
</script>
</body>
</html>
52 changes: 52 additions & 0 deletions encrypted-media/clearkey-mp4-playback-temporary-events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Encrypted Media Extensions: Successful playback, Temporary session with Clear Key, mp4, validating events</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">

<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/fetch.js></script>
<script src=/encrypted-media/util/testmediasource.js></script>
<script src=/encrypted-media/util/utf8.js></script>

<!-- Content metadata -->
<script src=/encrypted-media/content/content-metadata.js></script>

<!-- Message handler for Clear Key keysystem -->
<script src=/encrypted-media/util/clearkey-messagehandler.js></script>

<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/playback-temporary-events.js></script>

</head>
<body>
<div id='log'></div>

<div id='video'>
<video id="videoelement" width="200px"></video>
</div>

<script>
var contentitem = content['mp4-basic'],
config = { video: document.getElementById('videoelement'),
keysystem: 'org.w3.clearkey',
messagehandler: messagehandler.bind( contentitem ),
audioPath: contentitem.audio.path,
videoPath: contentitem.video.path,
audioType: contentitem.audio.type,
videoType: contentitem.video.type,
initDataType: 'keyids',
initData: getInitData(contentitem,'keyids'),
duration: 2 };

runTest(config);
</script>
</body>
</html>
Loading