Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake App for testing activity chain</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<script defer src="/js/chain.js"></script>
</head>
<body>
<input id="activityresult">
<button id="launchwindowactivity">Launch Window Activity</button>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Camera</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
</head>
<body id="default-test">
<h1>Default activity app</h1>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Camera</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<script defer src="/js/callee.js"></script>
</head>
<body>
<h1>I am a fake activity callee app.</h1>
</body>
</html>

View file

@ -0,0 +1,6 @@
'use strict';
navigator.mozSetMessageHandler('activity', function(activity) {
window.alert('hi');
activity.postResult('hi');
});

View file

@ -0,0 +1,15 @@
/* global MozActivity */
/* jshint nonew: false */
'use strict';
var activityOutput = document.getElementById('activityresult');
document.getElementById('launchwindowactivity')
.addEventListener('click', function() {
var activityRequest = new MozActivity({
name: 'test-chain-window'
});
activityRequest.onsuccess = function onSuccess() {
activityOutput.setAttribute('value', activityRequest.result);
};
});

View file

@ -0,0 +1,33 @@
{
"name": "Fake Activity Callee with inline deposition",
"description": "A fake activity callee",
"type": "certified",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"activities": {
"test-alert": {
"disposition": "inline",
"href": "index.html",
"returnValue": true
},
"test-chain-inline": {
"disposition": "inline",
"href": "chain.html",
"returnValue": true
},
"view": {
"disposition": "inline",
"href": "defaulttest.html",
"filters": {
"type": {
"required": true,
"value": ["url"]
}
}
}
}
}

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Activity Callee for window deposition</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<script defer src="/js/calleewindow.js"></script>
</head>
<body>
<h1>I am a fake activity callee for window deposition.</h1>
</body>
</html>

View file

@ -0,0 +1,6 @@
'use strict';
navigator.mozSetMessageHandler('activity', function(activity) {
alert('successfully launch app through window activity');
activity.postResult('successMsg');
});

View file

@ -0,0 +1,18 @@
{
"name": "Fake Activity Callee with Window deposition",
"description": "A fake activity callee",
"type": "certified",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"activities": {
"test-chain-window": {
"disposition": "window",
"href": "index.html",
"returnValue": true
}
}
}

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Activity Caller</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background-color: rebeccapurple;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<script defer src="/js/caller.js"></script>
</head>
<body>
<h1>I am a fake activity caller, in purple.</h1>
<button id="launchactivity">Launch</button>
<button id="testchainactivity">Test Chain Activity</button>
<button id="testdefaultactivity">Test Default Activity</button>
<button id="close">Close</button>
<input type="text" id="input" />
<select id="select"><option>hello</option><option>world</option></select>
<input type="date" id="dateinput" />
</body>
</html>

View file

@ -0,0 +1,32 @@
/* global MozActivity */
/* jshint nonew: false */
'use strict';
document.getElementById('launchactivity')
.addEventListener('click', function() {
new MozActivity({
name: 'test-alert'
});
});
document.getElementById('testchainactivity')
.addEventListener('click', function() {
new MozActivity({
name: 'test-chain-inline'
});
});
document.getElementById('testdefaultactivity')
.addEventListener('click', function() {
new MozActivity({
name: 'view',
data: {
type: 'url',
url: 'http://www.google.com'
}
});
});
document.getElementById('close').addEventListener('click', function() {
window.close();
});

View file

@ -0,0 +1,11 @@
{
"name": "Fake Activity Caller",
"description": "A fake activity caller",
"type": "certified",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Audio Channel Test App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/index.js"></script>
</head>
<body>
<div id="normal">
<span>Normal</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="content">
<span>Content</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="alarm">
<span>Alarm</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="system">
<span>System</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="ringer">
<span>Ringer</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="telephony">
<span>Telephony</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="notification">
<span>Notification</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
<div id="publicnotification">
<span>Public Notification</span>
<button class="play">Play</button>
<button class="pause">Pause</button>
<div/>
</body>
</html>

View file

@ -0,0 +1,21 @@
'use strict';
(function() {
['normal', 'content', 'alarm', 'system', 'ringer',
'telephony', 'notification', 'publicnotification'].forEach(function(type){
var play = document.querySelector('#' + type + ' .play');
var pause = document.querySelector('#' + type + ' .pause');
var audio = new Audio();
audio.src = 'audio/b2g.ogg';
audio.loop = true;
audio.mozAudioChannelType = type;
play.addEventListener('click', function() {
audio.play();
});
pause.addEventListener('click', function() {
audio.pause();
});
});
}());

View file

@ -0,0 +1,19 @@
{
"name": "Audio Channel Test App",
"type": "certified",
"description": "Audio Channel Test App",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"permissions": {
"audio-channel-content": {},
"audio-channel-alarm": {},
"audio-channel-system": {},
"audio-channel-ringer": {},
"audio-channel-telephony": {},
"audio-channel-notification": {},
"audio-channel-publicnotification": {}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Activity Caller</title>
</head>
<body>
<div>
<a href="http://example.com" id="link">A Link!</a>
<img src="data:image/png;base64,VBORw0KGgoAAAANSUhEUgAAAAsAAAALC" id="image1" />
<img src="./images/firefox.png" id="image2" />
</div>
<div contentEditable="true" style="height: 50px;" id="edit-area"></div>
</body>
</html>

View file

@ -0,0 +1,11 @@
{
"name": "Context Menu App",
"description": "App used to test context menus",
"type": "privileged",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Alarm App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/main.js"></script>
</head>
<body>
<span id="title">I am fake alarm app!</span>
</body>
</html>

View file

@ -0,0 +1,7 @@
'use strict';
// Tell audio channel manager that we want to adjust the alarm channel
// if the user press the volumeup/volumedown buttons in this app.
if (navigator.mozAudioChannelManager) {
navigator.mozAudioChannelManager.volumeControlChannel = 'alarm';
}

View file

@ -0,0 +1,10 @@
{
"name": "Fake Alarm App",
"description": "A fake alarm app",
"type": "certified",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: blue;
}
</style>
<script src="/test.js"></script>
</head>
<body>
Fake App, does nothing
</body>
</html>

View file

@ -0,0 +1,4 @@
{
"name": "alert test",
"launch_path": "/index.html"
}

View file

@ -0,0 +1,4 @@
'use strict';
window.addEventListener('load', function() {
document.querySelector('body').classList.add('loaded');
});

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Camera</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
button#snapshot {
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<script defer src="/js/fakecamera.js"></script>
</head>
<body>
<h1>I am fake camera app.</h1>
<div id="result"></div>
<button id="snapshot">Snapshot</button>
</body>
</html>

View file

@ -0,0 +1,8 @@
'use strict';
document.querySelector('body').classList.add('loaded');
document.getElementById('snapshot').addEventListener('click', function() {
document.getElementById('result').classList.add('done');
document.getElementById('result').textContent = 'done';
});

View file

@ -0,0 +1,11 @@
{
"name": "Fake Music",
"description": "A fake music app",
"type": "certified",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake App /w Chrome Navigation</title>
<style></style>
</head>
<body>
<h1>I am a fake app!</h1>
</body>
</html>

View file

@ -0,0 +1,13 @@
{
"name": "Fake Chrome Navigation",
"description": "A fake chrome navigation app",
"type": "certified",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"chrome": {
"navigation": true
}
}

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Dialer App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/fakedialer.js"></script>
</head>
<body>
<h1>I am fake dialer. I will get a call after 1 sec.</h1>
</body>
</html>

View file

@ -0,0 +1,5 @@
'use strict';
setTimeout(function() {
window.open('oncall.html', '', 'attention');
}, 1000);

View file

@ -0,0 +1,16 @@
{
"name": "Fake Dialer App",
"description": "A fake dialer app",
"type": "certified",
"launch_path": "/index.html",
"icons": {
"60": "/style/icons/Default.png"
},
"permissions": {
"attention": {}
},
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Dialer</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<h1>This is a call...</h1>
<input id="input" />
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Global Overlay App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/main.js"></script>
</head>
<body>
<h3>I am a fake global overlay app with global-clickthrough-overlay permission.
I will try a window.open(..., ..., 'global-clickthrough-overlay')
and should succeed.</h3>
</body>
</html>

View file

@ -0,0 +1,3 @@
'use strict';
window.open('overlay.html', '', 'global-clickthrough-overlay');

View file

@ -0,0 +1,16 @@
{
"name": "Fake Global Overlay App",
"description": "A fake global overlay app",
"type": "privileged",
"launch_path": "/index.html",
"icons": {
"60": "/style/icons/Default.png"
},
"permissions": {
"global-clickthrough-overlay": {}
},
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Overlay</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<h1>This is a overlay</h1>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Global Overlay App Without Permissions</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/main.js"></script>
</head>
<body>
<h3>I am a fake global overlay app without global-clickthrough-overlay permission.
I will try a window.open(..., ..., 'global-clickthrough-overlay')
and should fail.</h3>
</body>
</html>

View file

@ -0,0 +1,3 @@
'use strict';
window.open('overlay.html', '', 'global-clickthrough-overlay');

View file

@ -0,0 +1,13 @@
{
"name": "Fake Global Overlay App Without Permissions",
"description": "A fake global overlay app without permissions",
"type": "privileged",
"launch_path": "/index.html",
"icons": {
"60": "/style/icons/Default.png"
},
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Overlay</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<h1>This is a overlay</h1>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: green;
}
</style>
<script src="/test.js"></script>
</head>
<body>
Fake App, does nothing
</body>
</html>

View file

@ -0,0 +1,4 @@
{
"name": "alert test",
"launch_path": "/index.html"
}

View file

@ -0,0 +1,4 @@
'use strict';
window.addEventListener('load', function() {
document.querySelector('body').classList.add('loaded');
});

View file

@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JustInstalledApp</title>
</head>
<body>
<div id="installed-app"></div>
</body>
</html>

View file

@ -0,0 +1,22 @@
{
"name": "Anything",
"description": "Fake app to install after default launch set",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"launch_path": "/index.html",
"fullscreen": true,
"activities": {
"view": {
"disposition": "inline",
"href": "index.html",
"filters": {
"type": {
"required": true,
"value": ["url"]
}
}
}
}
}

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Loop App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/fakeloop.js"></script>
</head>
<body>
<h1>I am fake loop. I will get a call after 1 sec.</h1>
</body>
</html>

View file

@ -0,0 +1,5 @@
'use strict';
setTimeout(function() {
window.open('oncall.html', '', 'attention');
}, 1000);

View file

@ -0,0 +1,6 @@
'use strict';
// Loop would do some getUserMedia here but the safest way to get a
// hardware-independent permission prompt while running the test is
// to use the geolocation API.
navigator.geolocation.getCurrentPosition(function(){});

View file

@ -0,0 +1,17 @@
{
"name": "Fake Dialer App",
"description": "A fake dialer app",
"type": "certified",
"launch_path": "/index.html",
"icons": {
"60": "/style/icons/Default.png"
},
"permissions": {
"attention": {},
"geolocation": {}
},
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Loop</title>
<script defer src="/js/gum.js"></script>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<h1>This is a call...</h1>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Media App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<!-- <script defer src="/js/comms.js"></script> -->
</head>
<body>
<span id="title">I am fake media app!</span>
</body>
</html>

View file

@ -0,0 +1,10 @@
{
"name": "Fake Media App",
"description": "A fake media app",
"type": "certified",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Music</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/comms.js"></script>
<script defer src="/js/fakemusic.js"></script>
</head>
<body>
<div id="album-one">Album One</div>
<div>
<button id="previous">Previous</button>
<button id="play-pause">Play/Pause</button>
<button id="stop">Stop</button>
<button id="next">Next</button>
</div>
<button id="interrupt">Toggle interrupt</button>
</body>
</html>

View file

@ -0,0 +1,76 @@
'use strict';
/* global FakeMusic */
// XXX: After Dominic lands shared/js/media/remote_controls.js, we should switch
// to using that for our IAC code, since that's way closer to reality.
var FakeMusicComms = {
_ports: null,
_queuedMessages: [],
commands: {
playpause: function(event) {
FakeMusic.playpause();
},
prevtrack: function(event) {
FakeMusic.previous();
},
nexttrack: function(event) {
FakeMusic.next();
}
},
init: function() {
this._sendMessage('appinfo', {
origin: window.location.origin,
icon: window.location.origin + '/style/icons/Music.png'
});
var self = this;
navigator.mozApps.getSelf().onsuccess = function() {
var app = this.result;
app.connect('mediacomms').then(function(ports) {
self._ports = ports;
self._ports.forEach(function(port) {
port.onmessage = function(event) {
var message = event.data;
if (message.command in self.commands) {
self.commands[message.command](event);
}
};
self._queuedMessages.forEach(function(message) {
port.postMessage(message);
});
});
self._queuedMessages = null;
});
};
},
_sendMessage: function(name, value) {
var message = {type: name, data: value};
if (!this._ports) {
this._queuedMessages.push(message);
} else {
this._ports.forEach(function(port) {
port.postMessage(message);
});
}
},
notifyTrackChanged: function(metadata) {
this._sendMessage('nowplaying', metadata);
},
notifyStatusChanged: function(mode) {
this._sendMessage('status', mode);
}
};
window.addEventListener('load', function() {
FakeMusicComms.init();
});

View file

@ -0,0 +1,124 @@
'use strict';
/* global FakeMusicComms */
var albumOne = [
{ artist: 'Some Artist',
album: 'Some Album',
title: 'Some Song'
},
{ artist: 'Another Artist',
album: 'Some Album',
title: 'Another Song'
}
];
var FakeMusic = {
_mode: 'stopped',
_interrupted: false,
_queue: null,
_queueIndex: null,
init: function() {
window.addEventListener('click', this);
document.querySelector('body').classList.add('loaded');
},
startQueue: function(queue) {
this._queue = queue;
this._queueIndex = 0;
FakeMusicComms.notifyTrackChanged(this._queue[this._queueIndex]);
this.play();
},
play: function() {
if (this._interrupted) {
return;
}
this._mode = 'playing';
document.getElementById('play-pause').classList.remove('is-paused');
FakeMusicComms.notifyStatusChanged({playStatus: 'PLAYING'});
},
pause: function() {
if (this._interrupted) {
return;
}
this._mode = 'paused';
document.getElementById('play-pause').classList.add('is-paused');
FakeMusicComms.notifyStatusChanged({playStatus: 'PAUSED'});
},
playpause: function() {
if (this.isPlaying) {
this.pause();
} else {
this.play();
}
},
stop: function() {
if (this._interrupted) {
return;
}
this._mode = 'stopped';
document.getElementById('play-pause').classList.remove('is-paused');
FakeMusicComms.notifyStatusChanged({playStatus: 'STOPPED'});
},
previous: function() {
if (this._interrupted) {
return;
}
if (this._queueIndex > 0) {
FakeMusicComms.notifyTrackChanged(this._queue[--this._queueIndex]);
}
},
next: function() {
if (this._interrupted) {
return;
}
if (this._queueIndex < this._queue.length - 1) {
FakeMusicComms.notifyTrackChanged(this._queue[++this._queueIndex]);
} else {
this.stop();
}
},
toggleInterrupt: function() {
this._interrupted = !this._interrupted;
var status = this._interrupted ? 'mozinterruptbegin' : 'PLAYING';
FakeMusicComms.notifyStatusChanged({playStatus: status});
},
get isPlaying() {
return this._mode === 'playing';
},
handleEvent: function(event) {
switch (event.target.id) {
case 'play-pause':
this.playpause();
break;
case 'stop':
this.stop();
break;
case 'previous':
this.previous();
break;
case 'next':
this.next();
break;
case 'album-one':
this.startQueue(albumOne);
break;
case 'interrupt':
this.toggleInterrupt();
break;
}
}
};
window.addEventListener('load', function() {
FakeMusic.init();
});

View file

@ -0,0 +1,10 @@
{
"name": "Fake Music",
"description": "A fake music app",
"type": "certified",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fake Notification App</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script defer src="/js/main.js"></script>
</head>
<body>
<span id="title">I am fake notification app!</span>
</body>
</html>

View file

@ -0,0 +1,7 @@
'use strict';
// Tell audio channel manager that we want to adjust the notification
// channel if the user press the volumeup/volumedown buttons in this app.
if (navigator.mozAudioChannelManager) {
navigator.mozAudioChannelManager.volumeControlChannel = 'notification';
}

View file

@ -0,0 +1,10 @@
{
"name": "Fake Notification App",
"description": "A fake notification app",
"type": "certified",
"launch_path": "/index.html",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
input {
width: 6rem;
height: 2rem;
}
#bug-bottom-input {
position: absolute;
bottom: 0;
}
</style>
</head>
<body>
<h3>BUG 1110963, BUG 1115508, BUG 1119126</h3>
<input id="bug-center-input" value="testcenterinput">
<div id="bug-normal-div">NORMALDIV</div>
<input id="bug-bottom-input">
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
input {
width: 6rem;
height: 2rem;
}
textarea {
width: 6rem;
height: 6rem;
}
</style>
</head>
<body>
<h3>BUG 1120316</h3>
<input id="bug-input" value="test centerinput">
<textarea id="bug-textarea">test textarea</textarea>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
#bug-content {
width: 10rem;
height: 10rem;
overflow: auto;
}
</style>
</head>
<body>
<h3>BUG 1120358</h3>
<textarea id="bug-content" contenteditable="true">content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content&#13;&#10;content content</textarea>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
input {
width: 6rem;
height: 2rem;
position: absolute;
}
#bottom-left-input {
bottom: 0;
left: 0;
}
#bottom-right-input {
bottom: 0;
right: 0;
}
#center-input {
top: calc(50% - 1rem);
left: calc(50% - 3rem);
}
#top-left-input {
top: 1rem;
left: 0;
}
#top-right-input {
top: 1rem;
right: 0;
}
</style>
</head>
<body>
<input id="bottom-left-input" value="testbottomleft">
<input id="bottom-right-input" value="testbottomright">
<input id="center-input" value="testcenterinput">
<input id="top-left-input" value="testtopleftinput">
<input id="top-right-input" value="testrightinput">
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
input {
width: 6rem;
height: 2rem;
position: absolute;
}
#functionality-source {
top: calc(50% - 3rem);
left: calc(50% - 3rem);
}
#functionality-target {
top: calc(50% + 3rem);
left: calc(50% - 3rem);
}
</style>
</head>
<body>
<input id="functionality-source" value="testvalue">
<input id="functionality-target" value="">
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
</head>
<body>
DEFAULT PAGE
</body>
</html>

View file

@ -0,0 +1,11 @@
{
"name": "Fake TextSelection App",
"description": "A fake app for text selection test",
"type": "certified",
"launch_path": "/index.html",
"fullscreen": true,
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
}
}

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<title>Text Selection test</title>
<style>
input {
width: 6rem;
height: 2rem;
position: absolute;
}
#ne-center-input {
top: calc(50% - 1rem);
left: calc(50% - 3rem);
}
#noneditable {
position: absolute;
height: 2rem;
width: 6rem;
top: calc(50% - 3rem);
left: 0;
}
#noneditable-userselectnone {
-moz-user-select: none;
position: absolute;
height: 2rem;
width: 6rem;
top: calc(50% - 3rem);
right: 0;
}
</style>
</head>
<body>
<input id="ne-center-input" value="testcenterinput">
<div id="noneditable">NONEDITIABLEFIELD</div>
<div id="noneditable-userselectnone">NONEDITIABLEFIELD-NONESELECT</div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
Test fullscreen alert!
</body>
</html>

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,5 @@
{
"name": "alert test",
"launch_path": "/index.html",
"fullscreen": true
}

View file

@ -0,0 +1,13 @@
'use strict';
window.addEventListener('load', function() {
var timer = window.setInterval(function() {
if (!document.mozFullScreen) {
document.body.mozRequestFullScreen();
} else {
window.clearInterval(timer);
window.alert('Hello alive!');
}
}, 1000);
document.body.classList.add('loaded');
});

View file

@ -0,0 +1,49 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Serve the tests</title>
<script type="text/javascript" charset="utf-8">
(function(window){
var Loader = window.CommonResourceLoader = {},
host = document.location.host,
domain = host.replace(/(^[\w\d-]+\.)?([\w\d]+\.[a-z]+)/, 'test-agent.$2');
Loader.domain = document.location.protocol + '//' + domain;
Loader.url = function(url){
return this.domain + url;
}
Loader.script = function(url, doc){
doc = doc || document;
doc.write('<script type="application/javascript;version=1.8" src="' + this.url(url) + '"><\/script>');
return this;
};
}(this));
</script>
<style type="text/css" media="all">
html,body,iframe {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<!-- Test Agent UI will be loaded in here -->
<div id="test-agent-ui">
</div>
<script type="text/javascript" charset="utf-8">
CommonResourceLoader.
script('/common/test/test_url_resolver.js').
script('/common/vendor/test-agent/test-agent.js').
script('/common/test/agent_proxy.js');
</script>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Tests</title>
<link rel="stylesheet" type="text/css" href="/vendor/mocha/mocha.css" />
<style type="text/css" media="all">
iframe {
border: none;
padding: 0px;
}
</style>
<script type="text/javascript" charset="utf-8">
</script>
</head>
<body>
<div id="mocha">
</div>
<div id="test">
</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>fullscreen layout</title>
<script defer src="test.js"></script>
<style>
#blue {
width: 100px;
height: 100px;
background-color: blue;
}
</style>
</head>
<body>
<h1>fullscreen layout</h1>
<a href="#" id="fullscreen">fullscreen trigger</a>
<div id="blue">
</div>
</body>
</html>

View file

@ -0,0 +1,6 @@
{
"name": "fullscreen LAYOUT",
"launch_path": "/index.html",
"fullscreen": true,
"fullscreen_layout": true
}

View file

@ -0,0 +1,18 @@
'use strict';
var trigger = document.getElementById('fullscreen');
trigger.addEventListener('click', function(e) {
e.stopPropagation();
e.preventDefault();
var fsElem = document.getElementById('blue');
fsElem.mozRequestFullScreen();
});
var blue = document.getElementById('blue');
blue.addEventListener('touchstart', function(e) {
blue.style.backgroundColor = 'green';
});
blue.addEventListener('touchend', function(e) {
blue.style.backgroundColor = '';
});

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>fullscreen request without manifest value</title>
<script defer src="test.js"></script>
</head>
<body>
<h1>fullscreen request without manifest value</h1>
<a href="#" id="fullscreen">fullscreen trigger</a>
</body>
</html>

View file

@ -0,0 +1,5 @@
{
"name": "fullscreen request without manifest value",
"launch_path": "/index.html",
"fullscreen": true
}

View file

@ -0,0 +1,8 @@
'use strict';
var trigger = document.getElementById('fullscreen');
trigger.addEventListener('click', function(e) {
e.stopPropagation();
e.preventDefault();
document.documentElement.mozRequestFullScreen();
});

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Fullscreen navigation app.</title>
</head>
<body>
<h1>Fullscreen navigation app.</h1>
<a href="page2.html">Page 2</a>
<a id="page2-link">to sample server</a>
</body>
</html>

View file

@ -0,0 +1,6 @@
{
"name": "fullscreen nav app",
"launch_path": "/index.html",
"fullscreen": true,
"chrome": { "navigation": true }
}

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<a href="index.html">to the index.</a>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Hosted navigation app.</title>
</head>
<body>
<h1>Hosted navigation app.</h1>
<a href="page2.html">Page 2</a>
</body>
</html>

View file

@ -0,0 +1,5 @@
{
"name": "hosted nav app",
"launch_path": "/index.html",
"chrome": { "navigation": true }
}

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<a href="index.html">to the index.</a>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Icon Test Page (falls-back to favicon)</title>
</head>
<body>
<h1>Icon Test Page (falls-back to favicon)</h1>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Firefox Icon Test App</title>
<script src="/test.js"></script>
</head>
<body>
<h1>Firefox Icon Test App</h2>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Icon Test Page w. linked icon</title>
<link rel="icon" href="icons/256x256.png" type="image/png">
</head>
<body>
<h1>Icon Test Page w. linked icon</h1>
</body>
</html>

View file

@ -0,0 +1,11 @@
{
"name": "Icons Test Web App",
"short_name": "Icons Test",
"icons": [
{
"src": "/icons/64x64.png",
"sizes": "64x64",
"type": "image/png"
}
]
}

Some files were not shown because too many files have changed in this diff Show more