Created
July 4, 2012 20:25
-
-
Save mjschranz/3049382 to your computer and use it in GitHub Desktop.
Media
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener( "DOMContentLoaded", function() { | |
var _butter, | |
_iframe, | |
_media; | |
function startTests() { | |
asyncTest( "Media - Remove Track", function() { | |
var tracks = _media.tracks; | |
_butter.listen( "trackremoved", function() { | |
ok( true, "DERP" ); | |
}); | |
_media.removeTrack( tracks[ 0 ] ); | |
}); | |
} | |
// Halt the tests from running | |
stop(); | |
// load iframe into current doc | |
_iframe = document.createElement( "iframe" ); | |
_iframe.onload = function() { | |
_butter = _iframe.contentWindow.Butter.instances[ 0 ]; | |
_media = _butter.media[ 0 ]; | |
start(); | |
startTests(); | |
} | |
_iframe.src = "../../templates/test.html"; | |
document.body.appendChild( _iframe ); | |
}, false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment