<commit_before>function runEmbedPlaybackTests(videoSelector) {
	
	module("Embed Player Loads");

	test("embed player is embedded", function() {
		ok( $('.mv-player', '.mwplayer_interface' ) );
	});

	test("embed player is skinned", function() {
		ok( $('.play-btn-large') );
	});
	
	module("Embed Player Plays",
	{
		setup: function() 
		{
			this.player = $( videoSelector ).get(0);
			this.player.play();
			this.passed = false;
		},
		teardown: function()
		{
			if ( this.player ) 
			{ 
				this.player.stop(); 
			}
			this.player = undefined;
			this.passed = undefined;
		}
	});

	asyncTest("playback begins", function() {
		var player = this.player;
		setTimeout( function()
		{
			equal( player.isPlaying(), true );
			start();
		}, 5000);
	});
		
	asyncTest("playhead progresses", function() {
		var player = this.player;
		var passed = this.passed;
		setTimeout( function()
		{
			if ( player.currentTime > 0 ) { passed = true; };
			ok( passed );
			start();
		}, 5000);
	});

	asyncTest("pause playback", function() {
		var player = this.player;
		setTimeout( function() 
		{
			player.pause();
			equal( player.isPlaying(), false );
			start();
		}, 5000);
	});

	asyncTest("resume playback", function() {
		var player = this.player;
		player.pause();
		setTimeout( function()
		{ 
			player.play();
			equal( player.isPlaying(), true );
			start();
		}, 5000);

	});
	
	asyncTest("seek to video beginning + 5 sec", function() {
		var player = this.player;
		var passed = this.passed;
		player.doSeek( 5 / player.duration );
		setTimeout( function()
		{ 
			if ( player.currentTime <= 11 & player.currentTime >= 5) 
			{ 
				passed = true;
			} else {
				passed = false;
			}
			equal( passed, true );
			start();
		}, 6000);
	});

	asyncTest("playback ends", function() {
		var player = this.player;
		var passed = this.passed;
		$(player).bind('ended', function() { passed = true } );
		var performTestSeek = function()
		{
			player.doSeek( (player.duration - 2) / player.duration );
		};
		setTimeout( performTestSeek, 6000);
		setTimeout( function()
		{
			equal( passed, true );
			start();
		}, 12000);
	});
};<commit_msg>setting test timeouts very high to account for low memory environment of test grid<commit_after>function runEmbedPlaybackTests(videoSelector) {
	
	module("Embed Player Loads");

	test("embed player is embedded", function() {
		ok( $('.mv-player', '.mwplayer_interface' ) );
	});

	test("embed player is skinned", function() {
		ok( $('.play-btn-large') );
	});
	
	module("Embed Player Plays",
	{
		setup: function() 
		{
			this.player = $( videoSelector ).get(0);
			this.player.play();
			this.passed = false;
		},
		teardown: function()
		{
			if ( this.player ) 
			{ 
				this.player.stop(); 
			}
			this.player = undefined;
			this.passed = undefined;
		}
	});

	asyncTest("playback begins", function() {
		var player = this.player;
		setTimeout( function()
		{
			equal( player.isPlaying(), true );
			start();
		}, 10000);
	});
		
	asyncTest("playhead progresses", function() {
		var player = this.player;
		var passed = this.passed;
		setTimeout( function()
		{
			if ( player.currentTime > 0 ) { passed = true; };
			ok( passed );
			start();
		}, 10000);
	});

	asyncTest("pause playback", function() {
		var player = this.player;
		setTimeout( function() 
		{
			player.pause();
			equal( player.isPlaying(), false );
			start();
		}, 10000);
	});

	asyncTest("resume playback", function() {
		var player = this.player;
		player.pause();
		setTimeout( function()
		{ 
			player.play();
			equal( player.isPlaying(), true );
			start();
		}, 10000);

	});
	
	asyncTest("seek to video beginning + 5 sec", function() {
		var player = this.player;
		var passed = this.passed;
		player.doSeek( 5 / player.duration );
		setTimeout( function()
		{ 
			if ( player.currentTime <= 11 & player.currentTime >= 5) 
			{ 
				passed = true;
			} else {
				passed = false;
			}
			equal( passed, true );
			start();
		}, 12000);
	});

	asyncTest("playback ends", function() {
		var player = this.player;
		var passed = this.passed;
		$(player).bind('ended', function() { passed = true } );
		var performTestSeek = function()
		{
			player.doSeek( (player.duration - 2) / player.duration );
		};
		setTimeout( performTestSeek, 10000);
		setTimeout( function()
		{
			equal( passed, true );
			start();
		}, 20000);
	});
	*/
};
{'fraction_non_alphanumeric': 0.17204301075268819, 'fraction_numerical': 0.018302447952413637, 'mean_word_length': 3.1051643192488263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3848095', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1432, 'n_words': 343}