mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 00:17:32 +09:00
pt 1 in reviving the android build (copied from pm 28a1, wish me luck)
This commit is contained in:
parent
efa9662725
commit
d7788a6d6d
4249 changed files with 468189 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>HomeBanner test page</title>
|
||||
<meta name="viewport" content="initial-scale=1.0"/>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript">
|
||||
Components.utils.import("resource://gre/modules/Messaging.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/Home.jsm");
|
||||
|
||||
const TEXT = "The quick brown fox jumps over the lazy dog.";
|
||||
|
||||
function start() {
|
||||
var test = location.hash.substring(1);
|
||||
window[test]();
|
||||
}
|
||||
|
||||
var messageId;
|
||||
|
||||
function addMessage() {
|
||||
messageId = Home.banner.add({
|
||||
text: TEXT,
|
||||
onshown: function() {
|
||||
Messaging.sendRequest({ type: "TestHomeBanner:MessageShown" });
|
||||
},
|
||||
ondismiss: function() {
|
||||
Messaging.sendRequest({ type: "TestHomeBanner:MessageDismissed" });
|
||||
}
|
||||
});
|
||||
Messaging.sendRequest({ type: "TestHomeBanner:MessageAdded" });
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="start();">
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>IconGrid test page</title>
|
||||
<meta name="viewport" content="initial-scale=1.0"/>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript">
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/Prompt.jsm");
|
||||
|
||||
function start() {
|
||||
var test = location.hash.substring(1);
|
||||
window[test]();
|
||||
}
|
||||
|
||||
function test1() {
|
||||
var p = new Prompt({
|
||||
title: "Prompt 1",
|
||||
buttons: [
|
||||
"OK"
|
||||
],
|
||||
}).addIconGrid({
|
||||
items: [
|
||||
{ iconUri: "drawable://alert_camera", name: "Icon 1", selected: true },
|
||||
{ iconUri: "drawable://alert_download", name: "Icon 2" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 3" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 4" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 5" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 6" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 7" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 8" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 9" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 10" },
|
||||
{ iconUri: "drawable://icon", name: "Icon 11" },
|
||||
]
|
||||
});
|
||||
p.show(function(data) {
|
||||
sendResult(data.icongrid0 == 10, "Got result " + data.icongrid0);
|
||||
});
|
||||
}
|
||||
|
||||
function sendResult(pass, message) {
|
||||
setTimeout(function() {
|
||||
alert((pass ? "PASS " : "FAIL ") + message);
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="start();">
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue