Fix: @media -moz-pref supports #1072

ESR era syntax has been removed.
This commit is contained in:
alstjr7375 2025-03-11 02:58:46 +09:00
parent 209a1cfe13
commit d46476ce72
11 changed files with 1073 additions and 916 deletions

View file

@ -29,11 +29,11 @@
}
@include test("support pref") {
@include mode.SUPPORT_PREF;
@include mode.SUPPORT_BOOL_PREF;
@include assert {
@include output {
@if mode.isMediaPref() {
@if mode.isMediaBoolPref() {
@include example;
}
}
@ -44,11 +44,11 @@
}
@include test("media pref") {
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include assert {
@include output {
@if mode.isMediaPref() {
@if mode.isMediaBoolPref() {
@include example;
}
}
@ -86,11 +86,11 @@
}
@include test("support pref") {
@include mode.SUPPORT_PREF;
@include mode.SUPPORT_BOOL_PREF;
@include assert {
@include output {
@if mode.isMediaPref() {
@if mode.isMediaBoolPref() {
@include example;
}
}
@ -101,11 +101,11 @@
}
@include test("media pref") {
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include assert {
@include output {
@if mode.isMediaPref() {
@if mode.isMediaBoolPref() {
@include example;
}
}

View file

@ -137,7 +137,7 @@
@include test-module("Native Menu Option - Standard [mix]") {
@include mode.STANDARD;
@include mode.SUPPORT_PREF;
@include mode.SUPPORT_BOOL_PREF;
@include test("simple") {
@include assert {
@ -256,7 +256,7 @@
@include test-module("Native Menu Option - MediaPref [mix]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include test("simple") {
@include assert {

View file

@ -51,7 +51,7 @@
@include test-module("One Liner - MediaPref [mix]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include test("content") {
@include assert {
@ -167,9 +167,9 @@
}
}
@include test-module("One Liner for Responsive - MEDIA_PREF [mix]") {
@include test-module("One Liner for Responsive - MEDIA_BOOL_PREF [mix]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include test("Tabs on bottom") {
@include assert {

View file

@ -81,7 +81,7 @@
@include test-module("If exist pref - Standard [mix]") {
@include mode.STANDARD;
@include mode.SUPPORT_PREF;
@include mode.SUPPORT_BOOL_PREF;
@include test("simple") {
@include assert {
@ -156,9 +156,9 @@
}
}
@include test-module("If exist pref - MediaPref [mix]") {
@include test-module("If exist pref - MediaBoolPref [mix]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include test("simple") {
@include assert {
@ -233,6 +233,83 @@
}
}
@include test-module("If exist pref - Media [mix]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include test("simple") {
@include assert {
@include output {
@include option.Option("userChrome.tab.photon") {
@include example;
}
}
@include expect {
@#{media} #{'-moz-pref("userChrome.tab.photon")'} {
@include example;
}
}
}
}
@include test("multiple") {
@include assert {
@include output {
@include option.Option("userChrome.tab.photon", "userChrome.padding.photon") {
@include example;
}
}
@include expect {
@#{media} #{'-moz-pref("userChrome.tab.photon") or -moz-pref("userChrome.padding.photon")'} {
@include example;
}
}
}
}
@include test("simple `and`") {
@include assert {
@include output {
@include option.Option("userChrome.tab.photon" "userChrome.padding.photon") {
@include example;
}
}
@include expect {
@#{media} #{'(-moz-pref("userChrome.tab.photon") and -moz-pref("userChrome.padding.photon"))'} {
@include example;
}
}
}
}
@include test("multiple `and`") {
@include assert {
@include output {
@include option.Option("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow") {
@include example;
}
@include option.Option("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow", "userChrome.icon.panel_full") {
@include example;
}
@include option.Option("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow" "userChrome.icon.panel_full") {
@include example;
}
}
@include expect {
@#{media} #{'(-moz-pref("userChrome.tab.photon") and -moz-pref("userChrome.padding.photon")) or -moz-pref("userChrome.tab.box_shadow")'} {
@include example;
}
@#{media} #{'(-moz-pref("userChrome.tab.photon") and -moz-pref("userChrome.padding.photon")) or -moz-pref("userChrome.tab.box_shadow") or -moz-pref("userChrome.icon.panel_full")'} {
@include example;
}
@#{media} #{'(-moz-pref("userChrome.tab.photon") and -moz-pref("userChrome.padding.photon")) or (-moz-pref("userChrome.tab.box_shadow") and -moz-pref("userChrome.icon.panel_full"))'} {
@include example;
}
}
}
}
}
@include test-module("If not exist pref - ESR [mx]") {
@include mode.ESR;
@ -312,7 +389,7 @@
@include test-module("If not exist pref - Standard [mx]") {
@include mode.STANDARD;
@include mode.SUPPORT_PREF;
@include mode.SUPPORT_BOOL_PREF;
@include test("simple") {
@include assert {
@ -372,9 +449,9 @@
}
}
@include test-module("If not exist pref - MediaPref [mx]") {
@include test-module("If not exist pref - MediaBoolPref [mx]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include mode.MEDIA_BOOL_PREF;
@include test("simple") {
@include assert {
@ -433,3 +510,65 @@
}
}
}
@include test-module("If not exist pref - MediaPref [mx]") {
@include mode.STANDARD;
@include mode.MEDIA_PREF;
@include test("simple") {
@include assert {
@include output {
@include option.NotOption("userChrome.tab.photon") {
@include example;
}
}
@include expect {
@#{media} #{'not -moz-pref("userChrome.tab.photon")'} {
@include example;
}
}
}
}
@include test("multiple") {
@include assert {
@include output {
@include option.NotOption("userChrome.tab.photon", "userChrome.padding.photon") {
@include example;
}
}
@include expect {
@#{media} #{'(not -moz-pref("userChrome.tab.photon")) or (not -moz-pref("userChrome.padding.photon"))'} {
@include example;
}
}
}
}
@include test("multiple `and`") {
@include assert {
@include output {
@include option.NotOption("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow") {
@include example;
}
@include option.NotOption("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow", "userChrome.icon.panel_full") {
@include example;
}
@include option.NotOption("userChrome.tab.photon" "userChrome.padding.photon", "userChrome.tab.box_shadow" "userChrome.icon.panel_full") {
@include example;
}
}
@include expect {
@#{media} #{'((not -moz-pref("userChrome.tab.photon")) and (not -moz-pref("userChrome.padding.photon"))) or (not -moz-pref("userChrome.tab.box_shadow"))'} {
@include example;
}
@#{media} #{'((not -moz-pref("userChrome.tab.photon")) and (not -moz-pref("userChrome.padding.photon"))) or (not -moz-pref("userChrome.tab.box_shadow")) or (not -moz-pref("userChrome.icon.panel_full"))'} {
@include example;
}
@#{media} #{'((not -moz-pref("userChrome.tab.photon")) and (not -moz-pref("userChrome.padding.photon"))) or ((not -moz-pref("userChrome.tab.box_shadow")) and (not -moz-pref("userChrome.icon.panel_full")))'} {
@include example;
}
}
}
}
}