Chromium Code Reviews| Index: LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html |
| diff --git a/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html b/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html |
| index 294bec66235ed8b8655837dac41eee9af6cd3a50..c05808d24ce8dd2cdbb02215acb3c75341484603 100644 |
| --- a/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html |
| +++ b/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html |
| @@ -26,8 +26,14 @@ |
| testExpected('typeof mediaKeys', 'object'); |
| testExpected('mediaKeys.keySystem', 'org.w3.clearkey'); |
| testExpected('typeof mediaKeys.createSession', 'function'); |
| + |
| + testException('mediaKeys.createSession()', '"TypeError: Failed to execute \'createSession\' on \'MediaKeys\': 2 arguments required, but only 0 present."'); |
| + testException('mediaKeys.createSession("")', '"TypeError: Failed to execute \'createSession\' on \'MediaKeys\': 2 arguments required, but only 1 present."'); |
| + testException('mediaKeys.createSession("video/webm")', '"TypeError: Failed to execute \'createSession\' on \'MediaKeys\': 2 arguments required, but only 1 present."'); |
| testDOMException('mediaKeys.createSession("", new Uint8Array(1))', "DOMException.INVALID_ACCESS_ERR"); |
| - testDOMException('mediaKeys.createSession("unsupported/type")', "DOMException.NOT_SUPPORTED_ERR"); |
| + testDOMException('mediaKeys.createSession("video/webm", null)', "DOMException.INVALID_ACCESS_ERR"); |
| + testDOMException('mediaKeys.createSession("video/webm", new Uint8Array(0))', "DOMException.INVALID_ACCESS_ERR"); |
| + testDOMException('mediaKeys.createSession("unsupported/type", new Uint8Array(1))', "DOMException.NOT_SUPPORTED_ERR"); |
| consoleWrite(""); |
| consoleWrite("Test MediaKeySession."); |
| @@ -41,7 +47,15 @@ |
| testExpected('mediaKeySession.onwebkitkeyadded', null); |
| testExpected('mediaKeySession.onwebkitkeyerror', null); |
| testExpected('mediaKeySession.onwebkitkeymessage', null); |
| + testException('mediaKeySession.update()', '"TypeError: Failed to execute \'update\' on \'MediaKeySession\': 1 argument required, but only 0 present."'); |
| testDOMException('mediaKeySession.update(null)', "DOMException.INVALID_ACCESS_ERR"); |
| + |
| + // FIXME: Update this after MediaKeySession.error is hooked up. |
| + run('mediaKeySession.update(new Uint8Array(1))'); |
| + testExpected('mediaKeySession.error', null); |
|
xhwang
2014/01/15 01:33:08
Actually this doesn't work. We need to wait for th
ddorwin
2014/01/15 01:41:01
Should it really be null or is that just the curre
|
| + |
| + // FIXME: Test MediaKeySession.release(). |
| + |
| endTest(); |
| } |
| </script> |