Added browser-test.html
parent
34af8eec95
commit
0ea6df4c9e
2
Makefile
2
Makefile
|
@ -3,6 +3,7 @@ PATH_BUILD=./build
|
||||||
PATH_TOOLS=./tools
|
PATH_TOOLS=./tools
|
||||||
PATH_COMBINE_OUTPUT=${PATH_BUILD}/ease.js
|
PATH_COMBINE_OUTPUT=${PATH_BUILD}/ease.js
|
||||||
PATH_COMBINE_OUTPUT_FULL=${PATH_BUILD}/ease-full.js
|
PATH_COMBINE_OUTPUT_FULL=${PATH_BUILD}/ease-full.js
|
||||||
|
PATH_BROWSER_TEST=${PATH_TOOLS}/browser-test.html
|
||||||
|
|
||||||
COMBINE=${PATH_TOOLS}/combine
|
COMBINE=${PATH_TOOLS}/combine
|
||||||
|
|
||||||
|
@ -21,6 +22,7 @@ mkbuild:
|
||||||
combine: mkbuild
|
combine: mkbuild
|
||||||
${COMBINE} > ${PATH_COMBINE_OUTPUT}
|
${COMBINE} > ${PATH_COMBINE_OUTPUT}
|
||||||
INC_TEST=1 ${COMBINE} > ${PATH_COMBINE_OUTPUT_FULL}
|
INC_TEST=1 ${COMBINE} > ${PATH_COMBINE_OUTPUT_FULL}
|
||||||
|
cp ${PATH_BROWSER_TEST} ${PATH_BUILD}
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
test: default
|
test: default
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>ease.js Browser Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript" src="./ease-full.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/* <![CDATA[ */
|
||||||
|
var body = document.getElementsByTagName( 'body' )[ 0 ];
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
easejs.runTests();
|
||||||
|
|
||||||
|
body.style.color = 'green';
|
||||||
|
body.innerHTML = '<p>0 Failures.</p>' +
|
||||||
|
'<p>ease.js will run properly within this browser.</p>'
|
||||||
|
;
|
||||||
|
}
|
||||||
|
catch ( e )
|
||||||
|
{
|
||||||
|
body.style.color = 'red';
|
||||||
|
body.innerHTML = '<p>' + e.toString() + '</p>' +
|
||||||
|
'<p>Remember to run <tt>`make combine`</tt> and ensure that ' +
|
||||||
|
'easejs-full.js is in the same directory as this file.</p>'
|
||||||
|
;
|
||||||
|
}
|
||||||
|
/* ]]> */
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue