diff options
Diffstat (limited to 'testing/web-platform/tests/encrypted-media/util/utf8.js')
-rw-r--r-- | testing/web-platform/tests/encrypted-media/util/utf8.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testing/web-platform/tests/encrypted-media/util/utf8.js b/testing/web-platform/tests/encrypted-media/util/utf8.js new file mode 100644 index 0000000000..aea5ad7626 --- /dev/null +++ b/testing/web-platform/tests/encrypted-media/util/utf8.js @@ -0,0 +1,2 @@ +toUtf8 = function( o ) { return new TextEncoder().encode( JSON.stringify( o ) ); } +fromUtf8 = function( t ) { return JSON.parse( new TextDecoder().decode( t ) ); } |