<commit_before><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Initialization -->
<script id="sap-ui-bootstrap" type="text/javascript" src="../../../../../resources/sap-ui-core.js" 
	data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.ui.commons"></script>

<link rel="stylesheet" href="../../../../../resources/sap/ui/thirdparty/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/qunit.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/qunit/QUnitUtils.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon.js"></script>
<!--[if IE]>
	<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon-ie.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>	
<!-- This test is not running against the real Northwind service, but a fake service based on
     Sinon.SJ FakeXHR. To run on the real service instead please comment out the following line. -->
<script type="text/javascript" src="ODataModelFakeService.js"></script>

<!-- Test functions -->
<script language="javascript">

	// time to wait for server responses
	var timeout = 3000;
	var oModel;
	var sURI = "http://services.odata.org/V3/Northwind/Northwind.svc/";
		sURI = "../../../../../proxy/http/" + sURI.replace("http://","");
	
	var bChanged = false, bDataRequested = false, bDataReceived = false;
	
	var fnChange = function(oEvent) {
		bChanged = true;
		ok(bDataRequested && !bDataReceived,"change fired");
	};
	
	var fnDataRequested = function(oEvent) {
		bDataRequested = true;
		ok(!bDataReceived && !bChanged,"dataRequested fired");
	};
	
	var fnDataReceived = function(oEvent) {
		bDataReceived = true;
		ok(bChanged && bDataRequested,"dataRecieved fired");
	};
	
	// create a dummy AMD fdefine to check if shim works for datajs
	window.define = function() {
		throw Error("define should not be called");
	}
	window.define.amd = { vendor : "SAPUI5 QUnit Test" };

	function removeSharedMetadata() {
		var sServiceURI = sURI.replace(/\/$/, "");
		if (sap.ui.model.odata.v2.ODataModel.mServiceData
				&& sap.ui.model.odata.v2.ODataModel.mServiceData[sServiceURI]) {
			delete sap.ui.model.odata.v2.ODataModel.mServiceData[sServiceURI].oMetadata;
		}
	}

	function initModel(bJSON) {
		return new sap.ui.model.odata.v2.ODataModel(sURI, {
			json: bJSON,
			useBatch: true
		});
	}

	module("v2.ODataListBinding", {
		setup : function() {
			oModel = initModel(false);
		},
		teardown : function() {
			oModel = undefined;
			removeSharedMetadata();
		}
	});<commit_msg>[INTERNAL] QUnitTest: added dummy test for PhantomJS to avoid timeouts<commit_after><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Initialization -->
<script id="sap-ui-bootstrap" type="text/javascript" src="../../../../../resources/sap-ui-core.js" 
	data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.ui.commons"></script>

<link rel="stylesheet" href="../../../../../resources/sap/ui/thirdparty/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/qunit.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/qunit/QUnitUtils.js"></script>
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon.js"></script>
<!--[if IE]>
	<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon-ie.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>	
<!-- This test is not running against the real Northwind service, but a fake service based on
     Sinon.SJ FakeXHR. To run on the real service instead please comment out the following line. -->
<script type="text/javascript" src="ODataModelFakeService.js"></script>

<!-- Test functions -->
<script language="javascript">

	// time to wait for server responses
	var timeout = 3000;
	var oModel;
	var sURI = "http://services.odata.org/V3/Northwind/Northwind.svc/";
		sURI = "../../../../../proxy/http/" + sURI.replace("http://","");
	
	var bChanged = false, bDataRequested = false, bDataReceived = false;
	
	var fnChange = function(oEvent) {
		bChanged = true;
		ok(bDataRequested && !bDataReceived,"change fired");
	};
	
	var fnDataRequested = function(oEvent) {
		bDataRequested = true;
		ok(!bDataReceived && !bChanged,"dataRequested fired");
	};
	
	var fnDataReceived = function(oEvent) {
		bDataReceived = true;
		ok(bChanged && bDataRequested,"dataRecieved fired");
	};
	
	// create a dummy AMD fdefine to check if shim works for datajs
	window.define = function() {
		throw Error("define should not be called");
	}
	window.define.amd = { vendor : "SAPUI5 QUnit Test" };

	function removeSharedMetadata() {
		var sServiceURI = sURI.replace(/\/$/, "");
		if (sap.ui.model.odata.v2.ODataModel.mServiceData
				&& sap.ui.model.odata.v2.ODataModel.mServiceData[sServiceURI]) {
			delete sap.ui.model.odata.v2.ODataModel.mServiceData[sServiceURI].oMetadata;
		}
	}

	function initModel(bJSON) {
		return new sap.ui.model.odata.v2.ODataModel(sURI, {
			json: bJSON,
			useBatch: true
		});
	}

	module("v2.ODataListBinding", {
		setup : function() {
			oModel = initModel(false);
		},
		teardown : function() {
			oModel = undefined;
			removeSharedMetadata();
		}
	});

	// FIXME: test doesn't work in headless PhantomJS test cycle => using bindList twice!
	// strange - this works with MacOS PhantomJS - we need to retry with 2.0.1 when available!
	if (sap.ui.Device.browser.phantomJS) {
		asyncTest("ListBinding (phantomJS preflight test)", function(){
			var oBinding = oModel.bindList("/Categories");
			setTimeout(function() {
				ok(true, "Preflight test passed!");
				start();
			});
			if (this.clock) this.clock.tick(1);
		});
	}
{'fraction_non_alphanumeric': 0.20025798129635602, 'fraction_numerical': 0.00419219606578523, 'mean_word_length': 3.581240768094535, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 58, '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': '17043', 'n_tokens_mistral': 2162, 'n_tokens_neox': 2020, 'n_words': 414}