Skip to content

Commit fdf931e

Browse files
committed
tests: html5 template
1 parent 0ae9ed4 commit fdf931e

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

test/project.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<project>
33

4-
<meta title="Validators Tests" package="com.feathersui.validators.tests" version="1.0.0" company="Bowler Hat LLC" />
5-
<app main="TestMain" file="ValidatorsTests" />
4+
<meta title="Validators Tests" package="com.feathersui.validators.tests" version="1.0.0" company="Bowler Hat LLC"/>
5+
<app main="TestMain" file="ValidatorsTests"/>
6+
<window hidden="true"/>
67

7-
<source path="src" />
8-
<source path="../src" />
8+
<source path="src"/>
9+
<source path="../src"/>
910

10-
<haxelib name="openfl" />
11-
<haxelib name="utest" />
11+
<haxelib name="openfl"/>
12+
<haxelib name="utest"/>
1213

1314
<template path="templates" if="html5"/>
1415
</project>

test/templates/html5/template/index.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@
44
<meta charset="utf-8" />
55
<title>::APP_TITLE::</title>
66
<script type="text/javascript" src="./::APP_FILE::.js"></script>
7+
<style>
8+
html,body{margin:0;padding:0;height:100%;}
9+
::if (SET_OPENFL >= "9.4.0")::
10+
#openfl-content{position:absolute;top:-100%;::if (WIN_BACKGROUND)::background:#000000;::end::width:::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::;height:::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::;}
11+
::end::
12+
</style>
713
</head>
814
<body>
9-
<noscript
10-
>Please enable JavaScript in your web browser to run tests.</noscript
11-
>
15+
<noscript>Please enable JavaScript in your web browser to run tests.</noscript>
16+
::if (SET_OPENFL >= "9.4.0")::
17+
<div id="openfl-content"></div>
18+
<script type="text/javascript">
19+
lime.embed ("::APP_FILE::", "openfl-content", ::WIN_WIDTH::, ::WIN_HEIGHT::, { parameters: {} });
20+
</script>
21+
::else::
1222
<script type="text/javascript">
1323
lime.$scripts["::APP_FILE::"]();
1424
</script>
25+
::end::
1526
</body>
1627
</html>

0 commit comments

Comments
 (0)