summaryrefslogtreecommitdiffstats
path: root/testing/marionette/harness/marionette_harness/www/html5
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/blue.jpgbin0 -> 92 bytes
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/boolean_attributes.html2
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/geolocation.js29
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/green.jpgbin0 -> 92 bytes
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/offline.html1
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/red.jpgbin0 -> 92 bytes
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/status.html1
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/test.appcache11
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/test_html_inputs.html2
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5/yellow.jpgbin0 -> 92 bytes
-rw-r--r--testing/marionette/harness/marionette_harness/www/html5Page.html46
11 files changed, 92 insertions, 0 deletions
diff --git a/testing/marionette/harness/marionette_harness/www/html5/blue.jpg b/testing/marionette/harness/marionette_harness/www/html5/blue.jpg
new file mode 100644
index 0000000000..8ea27c42fa
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/blue.jpg
Binary files differ
diff --git a/testing/marionette/harness/marionette_harness/www/html5/boolean_attributes.html b/testing/marionette/harness/marionette_harness/www/html5/boolean_attributes.html
new file mode 100644
index 0000000000..431e575aef
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/boolean_attributes.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<input id='disabled' disabled>
diff --git a/testing/marionette/harness/marionette_harness/www/html5/geolocation.js b/testing/marionette/harness/marionette_harness/www/html5/geolocation.js
new file mode 100644
index 0000000000..4fb4a4747b
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/geolocation.js
@@ -0,0 +1,29 @@
+/* eslint-disable no-unsanitized/property */
+
+function success(position) {
+ let message = document.getElementById("status");
+ message.innerHTML =
+ "<img src='http://maps.google.com/maps/api/staticmap?center=" +
+ position.coords.latitude +
+ "," +
+ position.coords.longitude +
+ "&size=300x200&maptype=roadmap&zoom=12&&markers=size:mid|color:red|" +
+ position.coords.latitude +
+ "," +
+ position.coords.longitude +
+ "&sensor=false' />";
+ message.innerHTML += "<p>Longitude: " + position.coords.longitude + "</p>";
+ message.innerHTML += "<p>Latitude: " + position.coords.latitude + "</p>";
+ message.innerHTML += "<p>Altitude: " + position.coords.altitude + "</p>";
+}
+
+function error(msg) {
+ let message = document.getElementById("status");
+ message.innerHTML = "Failed to get geolocation.";
+}
+
+if (navigator.geolocation) {
+ navigator.geolocation.getCurrentPosition(success, error);
+} else {
+ error("Geolocation is not supported.");
+}
diff --git a/testing/marionette/harness/marionette_harness/www/html5/green.jpg b/testing/marionette/harness/marionette_harness/www/html5/green.jpg
new file mode 100644
index 0000000000..6a0d3bea47
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/green.jpg
Binary files differ
diff --git a/testing/marionette/harness/marionette_harness/www/html5/offline.html b/testing/marionette/harness/marionette_harness/www/html5/offline.html
new file mode 100644
index 0000000000..c24178b5f5
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/offline.html
@@ -0,0 +1 @@
+<html><head><title>Offline</title></head><body></body></html>
diff --git a/testing/marionette/harness/marionette_harness/www/html5/red.jpg b/testing/marionette/harness/marionette_harness/www/html5/red.jpg
new file mode 100644
index 0000000000..f296e27195
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/red.jpg
Binary files differ
diff --git a/testing/marionette/harness/marionette_harness/www/html5/status.html b/testing/marionette/harness/marionette_harness/www/html5/status.html
new file mode 100644
index 0000000000..394116a522
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/status.html
@@ -0,0 +1 @@
+<html><head><title>Online</title></head><body></body></html>
diff --git a/testing/marionette/harness/marionette_harness/www/html5/test.appcache b/testing/marionette/harness/marionette_harness/www/html5/test.appcache
new file mode 100644
index 0000000000..3bc4e00257
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/test.appcache
@@ -0,0 +1,11 @@
+CACHE MANIFEST
+
+CACHE:
+# Additional items to cache.
+yellow.jpg
+red.jpg
+blue.jpg
+green.jpg
+
+FALLBACK:
+status.html offline.html
diff --git a/testing/marionette/harness/marionette_harness/www/html5/test_html_inputs.html b/testing/marionette/harness/marionette_harness/www/html5/test_html_inputs.html
new file mode 100644
index 0000000000..a170ced1ab
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/test_html_inputs.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<input id='number' type=number>
diff --git a/testing/marionette/harness/marionette_harness/www/html5/yellow.jpg b/testing/marionette/harness/marionette_harness/www/html5/yellow.jpg
new file mode 100644
index 0000000000..7c609b3712
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5/yellow.jpg
Binary files differ
diff --git a/testing/marionette/harness/marionette_harness/www/html5Page.html b/testing/marionette/harness/marionette_harness/www/html5Page.html
new file mode 100644
index 0000000000..fbd943d792
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/www/html5Page.html
@@ -0,0 +1,46 @@
+<html manifest="html5/test.appcache">
+<!--
+Copyright 2011 Software Freedom Conservancy.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+
+<head>
+<title>HTML5</title>
+</head>
+<body>
+
+<h3>Geolocation Test</h3>
+<div id="status">Location unknown</div>
+<script language="javascript" type="text/javascript" src="html5/geolocation.js"></script>
+
+<h3>Application Cache Test</h3>
+<div id="images">
+ <p>Current network status: <span id="state"></span></p>
+ <script>
+ const state = document.getElementById('state')
+ setInterval(function () {
+ state.className = navigator.onLine ? 'online' : 'offline';
+ // eslint-disable-next-line no-unsanitized/property
+ state.innerHTML = navigator.onLine ? 'online' : 'offline';
+ }, 250);
+ </script>
+ <img id="red" src="html5/red.jpg">
+ <img id="blue" src="html5/blue.jpg">
+ <img id="green" src="html5/green.jpg">
+ <img id="yellow" src="html5/yellow.jpg">
+</div>
+
+</body>
+</html>