From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../client/accessibility/test/chrome/chrome.ini | 11 + .../test/chrome/contrast.snapshots.js | 262 +++++++++++++++++++++ devtools/client/accessibility/test/chrome/head.js | 32 +++ .../test/chrome/test_accessible_contrast.html | 84 +++++++ .../test/chrome/test_accessible_learnMoreLink.html | 97 ++++++++ .../test/chrome/test_accessible_openLink.html | 111 +++++++++ .../test/chrome/test_accessible_relations.html | 103 ++++++++ .../chrome/test_accessible_row_context_menu.html | 148 ++++++++++++ 8 files changed, 848 insertions(+) create mode 100644 devtools/client/accessibility/test/chrome/chrome.ini create mode 100644 devtools/client/accessibility/test/chrome/contrast.snapshots.js create mode 100644 devtools/client/accessibility/test/chrome/head.js create mode 100644 devtools/client/accessibility/test/chrome/test_accessible_contrast.html create mode 100644 devtools/client/accessibility/test/chrome/test_accessible_learnMoreLink.html create mode 100644 devtools/client/accessibility/test/chrome/test_accessible_openLink.html create mode 100644 devtools/client/accessibility/test/chrome/test_accessible_relations.html create mode 100644 devtools/client/accessibility/test/chrome/test_accessible_row_context_menu.html (limited to 'devtools/client/accessibility/test/chrome') diff --git a/devtools/client/accessibility/test/chrome/chrome.ini b/devtools/client/accessibility/test/chrome/chrome.ini new file mode 100644 index 0000000000..58a6a144bd --- /dev/null +++ b/devtools/client/accessibility/test/chrome/chrome.ini @@ -0,0 +1,11 @@ +[DEFAULT] +support-files = + head.js + contrast.snapshots.js + !/devtools/client/shared/components/test/chrome/head.js + +[test_accessible_contrast.html] +[test_accessible_learnMoreLink.html] +[test_accessible_openLink.html] +[test_accessible_relations.html] +[test_accessible_row_context_menu.html] diff --git a/devtools/client/accessibility/test/chrome/contrast.snapshots.js b/devtools/client/accessibility/test/chrome/contrast.snapshots.js new file mode 100644 index 0000000000..3b14ff8d66 --- /dev/null +++ b/devtools/client/accessibility/test/chrome/contrast.snapshots.js @@ -0,0 +1,262 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +"use strict"; + +window._snapshots = { + "ColorContrastAccessibility error render.": { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-check", + }, + children: [ + { + type: "h3", + props: { + className: "accessibility-check-header", + }, + children: ["Color and Contrast"], + }, + { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-color-contrast", + }, + children: [ + { + type: "span", + props: { + className: "accessibility-color-contrast-error", + role: "presentation", + }, + children: ["Unable to calculate"], + }, + ], + }, + ], + }, + "ColorContrastAccessibility basic render.": { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-check", + }, + children: [ + { + type: "h3", + props: { + className: "accessibility-check-header", + }, + children: ["Color and Contrast"], + }, + { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-color-contrast", + }, + children: [ + { + type: "span", + props: { + className: "accessibility-contrast-value FAIL", + role: "presentation", + style: { + "--accessibility-contrast-color": "rgba(255,0,0,1)", + "--accessibility-contrast-bg": "rgba(255,255,255,1)", + }, + }, + children: ["4.00"], + }, + ], + }, + { + type: "p", + props: { + className: "accessibility-check-annotation", + }, + children: [ + "Does not meet WCAG standards for accessible text. ", + { + type: "a", + props: { + className: "link", + href: + "https://developer.mozilla.org/docs/Web/Accessibility/" + + "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" + + "devtools&utm_medium=a11y-panel-checks-color-contrast", + onClick: + "openDocOnClick(event) {\n event.preventDefault();\n " + + "openDocLink(event.target.href);\n }", + }, + children: ["Learn more"], + }, + "", + ], + }, + ], + }, + "ColorContrastAccessibility range render.": { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-check", + }, + children: [ + { + type: "h3", + props: { + className: "accessibility-check-header", + }, + children: ["Color and Contrast"], + }, + { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-color-contrast", + }, + children: [ + { + type: "span", + props: { + className: "accessibility-contrast-value FAIL", + role: "presentation", + style: { + "--accessibility-contrast-color": "rgba(128,128,128,1)", + "--accessibility-contrast-bg": "rgba(219,106,116,1)", + }, + }, + children: ["1.19"], + }, + { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-color-contrast-separator", + }, + children: null, + }, + { + type: "span", + props: { + className: "accessibility-contrast-value FAIL", + role: "presentation", + style: { + "--accessibility-contrast-color": "rgba(128,128,128,1)", + "--accessibility-contrast-bg": "rgba(156,145,211,1)", + }, + }, + children: ["1.39"], + }, + ], + }, + { + type: "p", + props: { + className: "accessibility-check-annotation", + }, + children: [ + "Does not meet WCAG standards for accessible text. ", + { + type: "a", + props: { + className: "link", + href: + "https://developer.mozilla.org/docs/Web/Accessibility/" + + "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" + + "devtools&utm_medium=a11y-panel-checks-color-contrast", + onClick: + "openDocOnClick(event) {\n event.preventDefault();\n " + + "openDocLink(event.target.href);\n }", + }, + children: ["Learn more"], + }, + "", + ], + }, + ], + }, + "ColorContrastAccessibility large text render.": { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-check", + }, + children: [ + { + type: "h3", + props: { + className: "accessibility-check-header", + }, + children: ["Color and Contrast"], + }, + { + type: "div", + props: { + role: "presentation", + tabIndex: "-1", + className: "accessibility-color-contrast", + }, + children: [ + { + type: "span", + props: { + className: "accessibility-contrast-value AA", + role: "presentation", + style: { + "--accessibility-contrast-color": "rgba(255,0,0,1)", + "--accessibility-contrast-bg": "rgba(255,255,255,1)", + }, + }, + children: ["4.00"], + }, + { + type: "span", + props: { + className: "accessibility-color-contrast-large-text", + role: "presentation", + title: + "Text is 14 point and bold or larger, or 18 point or larger.", + }, + children: ["large text"], + }, + ], + }, + { + type: "p", + props: { + className: "accessibility-check-annotation", + }, + children: [ + "Meets WCAG AA standards for accessible text. ", + { + type: "a", + props: { + className: "link", + href: + "https://developer.mozilla.org/docs/Web/Accessibility/" + + "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" + + "devtools&utm_medium=a11y-panel-checks-color-contrast", + onClick: + "openDocOnClick(event) {\n event.preventDefault();\n " + + "openDocLink(event.target.href);\n }", + }, + children: ["Learn more"], + }, + "", + ], + }, + ], + }, +}; diff --git a/devtools/client/accessibility/test/chrome/head.js b/devtools/client/accessibility/test/chrome/head.js new file mode 100644 index 0000000000..a1a02df8a8 --- /dev/null +++ b/devtools/client/accessibility/test/chrome/head.js @@ -0,0 +1,32 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* eslint no-unused-vars: [2, {"vars": "local"}] */ + +"use strict"; + +var { require } = ChromeUtils.importESModule( + "resource://devtools/shared/loader/Loader.sys.mjs" +); +var { BrowserLoader } = ChromeUtils.import( + "resource://devtools/shared/loader/browser-loader.js" +); +var DevToolsUtils = require("resource://devtools/shared/DevToolsUtils.js"); + +var { require: browserRequire } = BrowserLoader({ + baseURI: "resource://devtools/client/shared/", + window, +}); + +window.EVENTS = {}; +window.on = function () {}; +window.off = function () {}; + +SimpleTest.registerCleanupFunction(() => { + window.EVENTS = null; + window.on = null; + window.off = null; +}); + +// All tests are asynchronous. +SimpleTest.waitForExplicitFinish(); diff --git a/devtools/client/accessibility/test/chrome/test_accessible_contrast.html b/devtools/client/accessibility/test/chrome/test_accessible_contrast.html new file mode 100644 index 0000000000..aeb1cc47a5 --- /dev/null +++ b/devtools/client/accessibility/test/chrome/test_accessible_contrast.html @@ -0,0 +1,84 @@ + + + + + + + Color Contrast accessibility component test + + + + + +
+
+
+
+
+
+ + diff --git a/devtools/client/accessibility/test/chrome/test_accessible_learnMoreLink.html b/devtools/client/accessibility/test/chrome/test_accessible_learnMoreLink.html new file mode 100644 index 0000000000..4644b21cd0 --- /dev/null +++ b/devtools/client/accessibility/test/chrome/test_accessible_learnMoreLink.html @@ -0,0 +1,97 @@ + + + + + + + LearnMoreLink component test + + + + + +
+
+
+
+ + diff --git a/devtools/client/accessibility/test/chrome/test_accessible_openLink.html b/devtools/client/accessibility/test/chrome/test_accessible_openLink.html new file mode 100644 index 0000000000..1ed351e2fb --- /dev/null +++ b/devtools/client/accessibility/test/chrome/test_accessible_openLink.html @@ -0,0 +1,111 @@ + + + + + + + Accessible component test + + + + + +
+
+
+
+ + diff --git a/devtools/client/accessibility/test/chrome/test_accessible_relations.html b/devtools/client/accessibility/test/chrome/test_accessible_relations.html new file mode 100644 index 0000000000..c2d868b50c --- /dev/null +++ b/devtools/client/accessibility/test/chrome/test_accessible_relations.html @@ -0,0 +1,103 @@ + + + + + + + Accessible component test + + + + + +
+
+
+
+ + diff --git a/devtools/client/accessibility/test/chrome/test_accessible_row_context_menu.html b/devtools/client/accessibility/test/chrome/test_accessible_row_context_menu.html new file mode 100644 index 0000000000..7cc2e6f005 --- /dev/null +++ b/devtools/client/accessibility/test/chrome/test_accessible_row_context_menu.html @@ -0,0 +1,148 @@ + + + + + + + AccessibilityRow context menu test + + + + + +
+
+
+
+ + -- cgit v1.2.3