summaryrefslogtreecommitdiffstats
path: root/comm/mail/test/browser/content-tabs/html/test-lwthemes.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mail/test/browser/content-tabs/html/test-lwthemes.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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>