wallet-core/testlib/selenium/testhost.html

49 lines
1.2 KiB
HTML
Raw Normal View History

2016-11-03 00:47:22 +01:00
<!doctype html>
<html>
<head>
<title>Browser Test Host</title>
2016-11-13 18:44:50 +01:00
<script src="/testlib/selenium/esprima.js"></script>
<script src="/testlib/selenium/escodegen.browser.js"></script>
<script src="/testlib/selenium/instrumenter.js"></script>
<!-- for instrumentation to work, we have to use the non-csp version -->
<script src="/testlib/selenium/system.js"></script>
2016-11-03 00:47:22 +01:00
<script>
2016-11-13 18:44:50 +01:00
var requestCoverage = false;
let parser = document.createElement('a');
let oldTranslate = System.translate.bind(System);
System.translate = (load) => {
if (!requestCoverage) {
return oldTranslate(load);
}
let inst = new Instrumenter();
let srcP = oldTranslate(load);
console.dir(load);
return Promise.resolve(srcP).then((src) => {
parser.href = load.name;
let modName = parser.pathname.substring(1);
return inst.instrumentSync(src, modName);
});
}
2016-11-03 00:47:22 +01:00
System.config({
2016-11-08 16:52:03 +01:00
baseURL: "/",
2016-11-03 00:47:22 +01:00
defaultJSExtensions: true,
meta: {
"lib/emscripten/taler-emscripten-lib": {
format: "global",
exports: "Module",
2016-11-13 17:25:36 +01:00
},
2016-11-03 00:47:22 +01:00
},
});
</script>
</head>
</html>