summaryrefslogtreecommitdiffstats
path: root/comm/mail/test/browser/content-tabs/html/test-lwthemes.html
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mail/test/browser/content-tabs/html/test-lwthemes.html')
-rw-r--r--comm/mail/test/browser/content-tabs/html/test-lwthemes.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/comm/mail/test/browser/content-tabs/html/test-lwthemes.html b/comm/mail/test/browser/content-tabs/html/test-lwthemes.html
new file mode 100644
index 0000000000..a43eb0062f
--- /dev/null
+++ b/comm/mail/test/browser/content-tabs/html/test-lwthemes.html
@@ -0,0 +1,44 @@
+<html><head>
+<title>test lightweight themes</title>
+</head><body>
+<script>
+var themes = [
+ {
+ id: "test-01",
+ name: "Test 01",
+ headerURL: "test.png",
+ footerURL: "test.png",
+ textcolor: "#fff",
+ accentcolor: "#6b6b6b",
+ },
+ {
+ id: "test-02",
+ name: "Test 02",
+ headerURL: "test.png",
+ footerURL: "test.png",
+ textcolor: "#bcf",
+ accentcolor: "#8888FF",
+ },
+];
+
+const INSTALL = "InstallBrowserTheme";
+const PREVIEW = "PreviewBrowserTheme";
+const RESET_PREVIEW = "ResetBrowserThemePreview";
+
+function setTheme(node, theme, action) {
+ node.setAttribute("data-browsertheme", JSON.stringify(themes[theme]));
+ dump("dispatching " + action + "\n");
+ node.dispatchEvent(new Event(action, { bubbles: true, cancelable: false }));
+}
+</script>
+
+<button id="install1"
+ onclick="setTheme(this, 0, INSTALL);"
+ onmouseover="setTheme(this, 0, PREVIEW);"
+ onmouseout="setTheme(this, 0, RESET_PREVIEW);">Test 01</button>
+<button id="install2"
+ onclick="setTheme(this, 1, INSTALL);"
+ onmouseover="setTheme(this, 1, PREVIEW);"
+ onmouseout="setTheme(this, 1, RESET_PREVIEW);">Test 02</button>
+</body>
+</html>