fbp-protocol-client
Version:
Client library for the FBP protocol
62 lines (57 loc) • 1.78 kB
HTML
<html>
<head>
<meta charset="utf-8">
<title>FBP Protocol Client browser tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<style type="text/css">
#app {
width: 800px;
height: 600px;
position: fixed;
right: 0px;
top: 100px;
border: none;
}
</style>
</head>
<body>
<div id="mocha"></div>
<iframe id="app"></iframe>
<script src="http://cdn.rawgit.com/rtc-io/rtc/v3.1.1/dist/rtc.js"></script>
<script src="http://rawgit.com/jonnor/polyfill/master/typedarray.js"></script>
<script src="http://chaijs.com/chai.js"></script>
<script src="../browser/fbp-protocol-client.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="webrtc.js"></script>
<script src="MicroFlo.js"></script>
<script>
var runner;
if (window.mochaPhantomJS) {
runner = window.mochaPhantomJS.run();
} else {
runner = mocha.run();
}
var failedTests = [];
if (runner.on) {
runner.on('end', function(){
window.mochaResults = runner.stats;
window.mochaResults.reports = failedTests;
});
runner.on('fail', logFailure);
}
function logFailure(test, err){
var flattenTitles = function(test){
var titles = [];
while (test.parent.title){
titles.push(test.parent.title);
test = test.parent;
}
return titles.reverse();
};
failedTests.push({name: test.title, result: false, message: err.message, stack: err.stack, titles: flattenTitles(test) });
};
</script>
</body>
</html>