Skip to content

Commit

Permalink
tests: html5 template
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Apr 5, 2024
1 parent 996c882 commit d5b369d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
13 changes: 7 additions & 6 deletions test/project.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<meta title="Formatters Tests" package="com.feathersui.formatters.tests" version="1.0.0" company="Bowler Hat LLC" />
<app main="TestMain" file="FormattersTests" />
<meta title="Formatters Tests" package="com.feathersui.formatters.tests" version="1.0.0" company="Bowler Hat LLC"/>
<app main="TestMain" file="FormattersTests"/>
<window hidden="true"/>

<source path="src" />
<source path="../src" />
<source path="src"/>
<source path="../src"/>

<haxelib name="openfl" />
<haxelib name="utest" />
<haxelib name="openfl"/>
<haxelib name="utest"/>

<template path="templates" if="html5"/>
</project>
17 changes: 14 additions & 3 deletions test/templates/html5/template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@
<meta charset="utf-8" />
<title>::APP_TITLE::</title>
<script type="text/javascript" src="./::APP_FILE::.js"></script>
<style>
html,body{margin:0;padding:0;height:100%;}
::if (SET_OPENFL >= "9.4.0")::
#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::;}
::end::
</style>
</head>
<body>
<noscript
>Please enable JavaScript in your web browser to run tests.</noscript
>
<noscript>Please enable JavaScript in your web browser to run tests.</noscript>
::if (SET_OPENFL >= "9.4.0")::
<div id="openfl-content"></div>
<script type="text/javascript">
lime.embed ("::APP_FILE::", "openfl-content", ::WIN_WIDTH::, ::WIN_HEIGHT::, { parameters: {} });
</script>
::else::
<script type="text/javascript">
lime.$scripts["::APP_FILE::"]();
</script>
::end::
</body>
</html>

0 comments on commit d5b369d

Please sign in to comment.