3 <title>HTML5 Game Benchmarks</title>
4 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
10 .test.pass .results, .test.fail .results {
24 .test .error-message {
31 background-color: #880000;
34 .test.error .error-message {
38 table thead th, table tfoot th {
49 border-collapse: collapse;
53 border: 2px solid #CCCCCC;
54 padding: 0.25em 0.5em;
64 <p>Basic benchmarks to measure HTML5 performance and support for game related features.<p>
66 <h2>Performance Tests</h2>
67 <p style="display: none;"><button disabled id="start-performance-tests">Run Tests</button></p>
70 <select id="ua-browser">
71 <option value="">Other...</option>
73 <optgroup label="Desktop">
74 <option>Firefox 3.6</option>
75 <option>Firefox 4-8</option>
76 <option>Firefox 9</option>
77 <option>Firefox 10</option>
78 <option>Google Chrome</option>
83 <option>Opera 11.x</option>
84 <option>Safari 5.1.5</option>
87 <optgroup label="Mobile">
88 <option>Android Browser</option>
89 <option>Blackberry Webkit</option>
90 <option>Google Chrome</option>
91 <option>Mobile Firefox 10</option>
92 <option>Mobile Google Chrome</option>
93 <option>Mobile IE8</option>
94 <option>Mobile IE9</option>
95 <option>Mobile Safari</option>
96 <option>Opera Mobile</option>
100 <input type="text" id="ua-browser-custom">
103 <p><label>Device name
104 <select id="ua-device-name">
105 <option value="">Other...</option>
107 <optgroup label="Laptop Computers">
108 <option>Macbook Pro 2.8 Ghz Intel Core 2 Duo 8 GB 1067 MHz DDR3</option>
111 <optgroup label="Android">
112 <option>Amazon Kindle Fire</option>
113 <option>Asus Eee Pad Transformer TF101</option>
114 <option>Asus Transformer Prime TF201</option>
115 <option>HTC EVO 4G</option>
116 <option>HTC EVO 3D</option>
117 <option>LG Optimus V</option>
118 <option>Motorola Droid 2</option>
119 <option>Motorola Droid</option>
120 <option>Motorola Droid RAZR XT910</option>
121 <option>Motorola Droid X / Shadow</option>
122 <option>Motorola XOOM</option>
123 <option>Samsung Droid Charge</option>
124 <option>Samsung Galaxy Fit</option>
125 <option>Samsung Galaxy Nexus</option>
126 <option>Samsung Galaxy S II (GT-I9100)</option>
127 <option>Samsung Galaxy Tab</option>
128 <option>Sony Ericsson Xperia PLAY</option>
129 <option>T-Mobile G2X</option>
130 <option>T-Mobile myTouch 4G Slide</option>
133 <optgroup label="iOS">
134 <option>iPhone 3GS</option>
135 <option>iPhone 4</option>
136 <option>iPhone 4S</option>
137 <option>iPad</option>
138 <option>iPad 2</option>
139 <option>iPod Touch 4G</option>
142 <optgroup label="Etc.">
143 <option>Blackberry Torch</option>
144 <option>Blackberry Playbook</option>
145 <option>HTC HD7S Windows Phone</option>
149 <input type="text" id="ua-device-name-custom">
154 <option value="">Other...</option>
156 <optgroup label="Desktop">
157 <option>Mac OS X 10.6.8</option>
158 <option>Mac OS X 10.7.3</option>
159 <option>Windows 7</option>
162 <optgroup label="Android">
163 <option>Android 2.2.2</option>
164 <option>Android 2.2.3</option>
165 <option>Android 2.3.3</option>
166 <option>Android 2.3.4</option>
167 <option>Android 2.3.5</option>
168 <option>Android 2.3.6</option>
169 <option>Android 3.2</option>
170 <option>Android 3.2.1</option>
171 <option>Android 3.2.4</option>
172 <option>Android 3.2.6</option>
173 <option>Android 4.0.2</option>
174 <option>Android 4.0.3</option>
175 <option>Android 4.0.4</option>
178 <optgroup label="iOS">
179 <option>iOS 4.2</option>
180 <option>iOS 4.3.2</option>
181 <option>iOS 4.3.3</option>
182 <option>iOS 4.3.5</option>
183 <option>iOS 5.0.1</option>
184 <option>iOS 5.1</option>
185 <option>iOS 5.1.1</option>
188 <optgroup label="Other Mobile">
189 <option>Windows Phone 7.5</option>
190 <option>Blackberry Playbook 1.0.8.6067</option>
191 <option>Blackberry 7.0.0.261</option>
195 <input type="text" id="ua-os-custom">
198 <p><label>Device type
199 <select id="ua-type">
200 <option>Laptop</option>
201 <option>Phone</option>
202 <option>Tablet</option>
203 <option>Desktop</option>
207 <p><label>Other data <input type="text" id="ua-misc"></label></p>
209 <p><button disabled id="upload-performance-tests">Run Tests and Upload Results</button></p>
211 <p>This will upload test results to your <em>local web server</em>. See <code>README.md</code> in the PerfMarks repository for details.</p>
214 <li id="performance-sprites"><span class="name">Sprites</span>
215 <div id="performance-sprites-placeholder"></div>
216 <li id="performance-audioLatency" class="test"><span class="name">Audio latency</span>
218 <li>Cold play latency: <span data-property="coldLatency"></span>ms
219 <li>Warm play latency: <span data-property="warmLatency"></span>ms
221 <li id="performance-text"><span class="name">Canvas text</span>
222 <div id="performance-text-placeholder"></div>
225 <h2>Test Result Data</h2>
226 <textarea id="all-test-results"></textarea>
229 Object.keys = function keys(object) {
230 // Quick shim; doesn't handle IE bugs
233 for (key in object) {
234 if (Object.prototype.hasOwnProperty.call(object, key)) {
242 var onLoadFunctions = [ ];
245 function registerOnLoad(fn) {
249 onLoadFunctions.push(fn);
253 window.addEventListener('load', function () {
255 while (onLoadFunctions.length) {
256 var fn = onLoadFunctions.shift();
261 window.registerOnLoad = registerOnLoad;
265 <script src="js/curl.js"></script>
266 <script>curl({ baseUrl: 'js' }, [ 'index' ]);</script>