Skip to content

Commit 6ab6b16

Browse files
committed
Add new write storage page and update versioning to v3.0
1 parent 66c3153 commit 6ab6b16

File tree

8 files changed

+561
-0
lines changed

8 files changed

+561
-0
lines changed

v3.0/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
*.swp

v3.0/downloads.html

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE HTML>
2+
<!-- This Source Code Form is subject to the terms of the Mozilla Public
3+
- License, v. 2.0. If a copy of the MPL was not distributed with this
4+
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5+
<html dir="ltr" xml:lang="en-US" lang="en-US">
6+
<head>
7+
<meta charset="utf8">
8+
<style>
9+
td, th {
10+
border: 1px solid #dddddd;
11+
text-align: left;
12+
padding: 8px;
13+
}
14+
</style>
15+
</head>
16+
<body>
17+
<!--This is a test page for downloading various file types.
18+
Using the table format to show all the links on 2 rows, avoiding the need to scroll the page
19+
-->
20+
<table style="width:100%">
21+
<tr>
22+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/washington.pdf"
23+
download="washington.pdf">Download washington.pdf</a>
24+
</td>
25+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/web_icon.png"
26+
download="web_icon.png">Download web_icon.png</a>
27+
</td>
28+
</tr>
29+
<tr>
30+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/audioSample.mp3"
31+
download="audioSample.mp3">Download audioSample.mp3</a>
32+
</td>
33+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/videoSample.webm"
34+
download="videoSample.webm">Download videoSample.webm</a>
35+
</td>
36+
</tr>
37+
<tr>
38+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/1GB.zip"
39+
download="1GB.zip">Download 1GB.zip</a>
40+
</td>
41+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/smallZip.zip"
42+
download="smallZip.zip">Download smallZip.zip</a>
43+
</td>
44+
</tr>
45+
<tr>
46+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/executable.exe"
47+
download="executable.exe">Download executable.exe</a>
48+
</td>
49+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/CSVfile.csv"
50+
download="CSVfile.csv">Download CSVfile.csv</a>
51+
</td>
52+
</tr>
53+
<tr>
54+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/Data1KB.dat"
55+
download="Data1KB.dat">Download Data1KB.dat</a>
56+
</td>
57+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/htmlFile.html"
58+
download="htmlFile.html">Download htmlFile.html</a>
59+
</td>
60+
</tr>
61+
<tr>
62+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/MyDocument.docx"
63+
download="MyDocument.docx">Download MyDocument.docx</a>
64+
</td>
65+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/MyOldWordDocument.doc"
66+
download="MyOldWordDocument.doc">Download MyOldWordDocument.doc</a>
67+
</td>
68+
</tr>
69+
<tr>
70+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/textfile.txt"
71+
download="textfile.txt">Download textfile.txt</a>
72+
</td>
73+
<td><a href="https://storage.googleapis.com/mobile_test_assets/public/XMLfile.xml"
74+
download="XMLfile.xml">Download XMLfile.xml</a>
75+
</td>
76+
</tr>
77+
<tr>
78+
<td colspan="2"><a href="https://storage.googleapis.com/mobile_test_assets/public/tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg"
79+
download="tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg">Download tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg</a>
80+
</td>
81+
</tr>
82+
</table>
83+
</body>
84+
</html>

v3.0/externalLinks.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>External_links</title>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width">
7+
<link rel="manifest" href="manifest.json">
8+
<link href="https://fonts.googleapis.com/css?family=Hanalei+Fill" rel="stylesheet">
9+
</head>
10+
11+
<p class="header">Misc Link Types</p>
12+
<section>
13+
<a href="https://mozilla-mobile.github.io/testapp/downloads">External link</a>
14+
</section>
15+
16+
<section>
17+
<a href="mailto://[email protected]">Email link</a>
18+
</section>
19+
20+
<section>
21+
<a href="tel://1234567890">Telephone link</a>
22+
</section>
23+
24+
</html>

v3.0/index.html

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<link rel="manifest" href="manifest.json">
7+
<link href="https://fonts.googleapis.com/css?family=Hanalei+Fill" rel="stylesheet">
8+
9+
<title>Test App</title>
10+
<style type="text/css">
11+
section { padding: 1em 0; }
12+
p.customfont {
13+
font-family: "Hanalei Fill";
14+
color: red;
15+
}
16+
17+
p.header {
18+
font: Arial;
19+
font-weight: bold;
20+
}
21+
</style>
22+
</head>
23+
<script>
24+
function myFunction() {
25+
alert("Yo, I am an alert box!");
26+
}
27+
</script>
28+
29+
30+
<body>
31+
32+
<h1>Lets test!</h1>
33+
34+
<h2>Privacy & Security</h2>
35+
<hr>
36+
37+
<section>
38+
<p class="header">Tracking Protection (TP) Test Pages</p>
39+
NOTE: Please use <a href="https://senglehardt.com/test/trackingprotection/test_pages/">https://senglehardt.com/test/trackingprotection/test_pages/</a><br>
40+
until <a href="https://github.com/mozilla/tracking-test/pull/13">https://github.com/mozilla/tracking-test/pull/13</a> is ready
41+
42+
43+
<p class="header">SSL Test</p>
44+
Very bad SSL (should show up w/ a broken lock!)
45+
<a href="https://very.badssl.com/">https://very.badssl.com/</a>
46+
47+
<p class="header">Custom Font Test</p>
48+
<p class="customfont">This is some crazy font text!</p>
49+
50+
<p class="header">Javascript Action Test</p>
51+
<button onclick="myFunction()">Click here for JS alert</button>
52+
53+
<p class="header">Blocked Cookies Test</p>
54+
<a href="https://www.whatismybrowser.com/detect/are-cookies-enabled">Are Cookies Enabled?</a><br>
55+
<a href="https://www.whatismybrowser.com/detect/are-third-party-cookies-enabled">Are 3rd Party Cookies Enabled?</a>
56+
57+
</section>
58+
59+
<h2>HTML Controls</h2>
60+
<hr>
61+
62+
<section>
63+
<p class="header">Password Form</p>
64+
(will show a doorhanger to remember the password)
65+
<form>
66+
<input type="text" placeholder="Username" /><br />
67+
<input type="password" placeholder="Password" /><br />
68+
<input type="submit" />
69+
</form>
70+
</section>
71+
72+
<section>
73+
<p class="header">Dropdown Menu</p>
74+
75+
<select>
76+
<option>Some option</option>
77+
<option>This option</option>
78+
<option>That option</option>
79+
<option>Another option</option>
80+
</select>
81+
</section>
82+
83+
<section>
84+
<p class="header">Location Menu</p>
85+
<button id="location">Get Location</button>
86+
<p id="location-result"></p>
87+
</section>
88+
89+
<section>
90+
<p class="header">File Download</p>
91+
<a href="https://storage.googleapis.com/mobile_test_assets/public/web_icon.png" download>Download this icon</a>
92+
</section>
93+
94+
<section>
95+
<p class="header">Open PDF File</p>
96+
<a href="https://storage.googleapis.com/mobile_test_assets/public/lorem_ipsum.pdf" target="_blank">Open this PDF File</a>
97+
</section>
98+
99+
100+
<section>
101+
<p class="header">Date Picker Menu</p>
102+
<input type="date" placeholder="Pick a Date" />
103+
</section>
104+
105+
<section>
106+
<input type="datetime-local" placeholder="Pick a Date/Time" />
107+
</section>
108+
109+
<section>
110+
<p class="header">Color Picker Menu</p>
111+
<input type="color" />
112+
</section>
113+
114+
<section>
115+
<p class="header">Input Text Menu</p>
116+
<p>Make sure you can copy <input type="text" placeholder="and Paste" /> me</p>
117+
</section>
118+
119+
<p class="header">Misc Link Types</p>
120+
<section>
121+
<a href="http://google.com">External link</a>
122+
</section>
123+
124+
<section>
125+
<a href='market://details?id=org.mozilla.firefox&referrer="+"utm_source%3Dmozilla%26utm_medium%3DReferral%26utm_campaign%3Dmozilla-org'>External app (play store) using URL (market://...)</a>
126+
</section>
127+
128+
<section>
129+
<a href="http://mozilla-mobile.github.io/testapp2/">External app same origin</a><br>
130+
see: <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy">Same Origin Policy</a>
131+
</section>
132+
133+
<section>
134+
<a href="https://m.youtube.com/watch?v=I47Y6VHc3Ms">Link to youtube</a> - make sure video plays
135+
</section>
136+
137+
<section>
138+
<a href="mailto://[email protected]">Email link</a>
139+
</section>
140+
141+
<section>
142+
<a href="tel://+1-234-555-1212">Telephone link</a>
143+
</section>
144+
145+
146+
<h2>Site Permissions</h2>
147+
<hr>
148+
149+
<section>
150+
<p class="header">Test Geolocation</p>
151+
<span id="live-geolocation">click here</span>
152+
</section>
153+
154+
<section>
155+
<p class="header">Test Camera Dialogue</p>
156+
<input id=video type=button value="Open camera" onclick=open_camera() >
157+
</section>
158+
159+
<section>
160+
<p class="header">Test Microphone Dialogue</p>
161+
<input id=audio type=button value="Open microphone" onclick=open_microphone() >
162+
</section>
163+
164+
<section>
165+
<p class="header">Test Notifications Dialogue</p>
166+
<input id=notify type=button value="Open notifications dialogue" onclick=open_notifications() >
167+
</section>
168+
169+
<script>
170+
// Grab elements, create settings, etc.
171+
function open_camera() {
172+
var video = document.getElementById('video');
173+
174+
// Get access to the camera!
175+
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
176+
// Not adding `{ audio: true }` since we only want video now
177+
navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) {
178+
//video.src = window.URL.createObjectURL(stream);
179+
//video.srcObject = stream;
180+
video.play();
181+
});
182+
}
183+
}
184+
185+
function open_microphone() {
186+
var audio = document.getElementById('audio');
187+
188+
// Get access to the camera!
189+
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
190+
// Not adding `{ audio: true }` since we only want audio now
191+
navigator.mediaDevices.getUserMedia({ audio: true }).then(function(stream) {
192+
//audio.src = window.URL.createObjectURL(stream);
193+
//audio.srcObject = stream;
194+
audio.play();
195+
});
196+
}
197+
}
198+
199+
function open_notifications() {
200+
Notification.requestPermission().then(function(result) {
201+
if (result === 'denied') {
202+
console.log('Permission wasn\'t granted. Allow a retry.');
203+
return;
204+
}
205+
if (result === 'default') {
206+
console.log('The permission request was dismissed.');
207+
return;
208+
}
209+
// Do something with the granted permission.
210+
});
211+
}
212+
</script>
213+
214+
215+
216+
<h2>Other</h2>
217+
<hr>
218+
<section>
219+
<p class="header">File Upload</p>
220+
<a href="https://webcompat.com/issues/new?url=http%3A%2F%2Fwww.mozilla.org">Web Compat Reporting Tool</a>
221+
</section>
222+
223+
</body>
224+
225+
<script src="j/jquery.js"></script>
226+
<script src="j/geoPosition.js"></script>
227+
<script src="//maps.googleapis.com/maps/api/js?sensor=true"></script>
228+
<script>
229+
function supports(bool, suffix) {
230+
var s = "Your browser ";
231+
if (bool) {
232+
s += "supports " + suffix + ".";
233+
} else {
234+
s += "does not support " + suffix + ". :(";
235+
}
236+
return s;
237+
}
238+
function lookup_location() {
239+
geoPosition.getCurrentPosition(show_map, show_map_error);
240+
}
241+
function show_map(loc) {
242+
$("#geo-wrapper").css({'width':'320px','height':'350px'});
243+
var map = new google.maps.Map(document.getElementById("geo-wrapper"), {zoom: 14, mapTypeControl:true, zoomControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP});
244+
var center = new google.maps.LatLng(loc.coords.latitude,loc.coords.longitude);
245+
map.setCenter(center);
246+
var marker = new google.maps.Marker({map: map, position: center, draggable: false, title: "You are here (more or less)"});
247+
}
248+
function show_map_error() {
249+
$("#live-geolocation").html('Unable to determine your location.');
250+
}
251+
$(function() {
252+
if (geoPosition.init()) {
253+
$("#live-geolocation").html(supports(true, "geolocation") + '<br><input type=button value="Open Geolocation" onclick="lookup_location();return false">');
254+
} else {
255+
$("#live-geolocation").html(supports(false, "geolocation"));
256+
}
257+
});
258+
</script>
259+
260+
<script type="text/javascript">
261+
document.getElementById('location').addEventListener('click', function() {
262+
navigator.geolocation.getCurrentPosition(function(pos) {
263+
document.getElementById('location-result').innerText = JSON.stringify({
264+
longitude: pos.coords.longitude,
265+
latitude: pos.coords.latitude
266+
});
267+
});
268+
});
269+
</script>
270+
271+
</html>

0 commit comments

Comments
 (0)