mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-06 09:56:36 +00:00
chore: Finish refactor and fix tests, b=no-bug, c=tests, scripts, glance
This commit is contained in:
@@ -15,6 +15,15 @@ IGNORE_PREFS_FILE_OUT = os.path.join(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class JSONWithCommentsDecoder(json.JSONDecoder):
|
||||||
|
def __init__(self, **kw):
|
||||||
|
super().__init__(**kw)
|
||||||
|
|
||||||
|
def decode(self, s: str) -> any:
|
||||||
|
s = '\n'.join(l for l in s.split('\n') if not l.lstrip(' ').startswith('//'))
|
||||||
|
return super().decode(s)
|
||||||
|
|
||||||
|
|
||||||
def copy_ignore_prefs():
|
def copy_ignore_prefs():
|
||||||
print("Copying ignorePrefs.json from src/zen/tests to engine/testing/mochitest...")
|
print("Copying ignorePrefs.json from src/zen/tests to engine/testing/mochitest...")
|
||||||
# if there are prefs that dont exist on output file, copy them from input file
|
# if there are prefs that dont exist on output file, copy them from input file
|
||||||
@@ -22,7 +31,7 @@ def copy_ignore_prefs():
|
|||||||
with open(IGNORE_PREFS_FILE_OUT, 'r') as f:
|
with open(IGNORE_PREFS_FILE_OUT, 'r') as f:
|
||||||
all_prefs = json.load(f)
|
all_prefs = json.load(f)
|
||||||
with open(IGNORE_PREFS_FILE_IN, 'r') as f_in:
|
with open(IGNORE_PREFS_FILE_IN, 'r') as f_in:
|
||||||
new_prefs = json.load(f_in)
|
new_prefs = json.load(f_in, cls=JSONWithCommentsDecoder)
|
||||||
all_prefs.extend(p for p in new_prefs if p not in all_prefs)
|
all_prefs.extend(p for p in new_prefs if p not in all_prefs)
|
||||||
with open(IGNORE_PREFS_FILE_OUT, 'w') as f_out:
|
with open(IGNORE_PREFS_FILE_OUT, 'w') as f_out:
|
||||||
json.dump(all_prefs, f_out, indent=2)
|
json.dump(all_prefs, f_out, indent=2)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -123,7 +123,6 @@
|
|||||||
flex: unset !important;
|
flex: unset !important;
|
||||||
/* Promote to its own layer during transitions to reduce jank */
|
/* Promote to its own layer during transitions to reduce jank */
|
||||||
will-change: transform, top, left;
|
will-change: transform, top, left;
|
||||||
transform-origin: center;
|
|
||||||
width: 85%;
|
width: 85%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
@@ -149,6 +148,12 @@
|
|||||||
background: light-dark(rgb(255, 255, 255), rgb(32, 32, 32)) !important;
|
background: light-dark(rgb(255, 255, 255), rgb(32, 32, 32)) !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.08s;
|
||||||
|
|
||||||
|
@starting-style {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[animate='true'] {
|
&[animate='true'] {
|
||||||
@@ -158,7 +163,7 @@
|
|||||||
|
|
||||||
&[fade-out='true'] {
|
&[fade-out='true'] {
|
||||||
& browser {
|
& browser {
|
||||||
transition: opacity 0.1s ease-in-out;
|
transition: opacity 0.2s ease-in-out;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,4 +175,5 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
border-radius: var(--zen-native-inner-radius);
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,14 @@
|
|||||||
|
// 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/.
|
||||||
|
//
|
||||||
|
// This file lists preferences that are ignored when running mochitests.
|
||||||
|
// Add here any preference that is not relevant for testing Zen Modus.
|
||||||
|
// This prevents unnecessary test re-runs when these preferences are changed.
|
||||||
[
|
[
|
||||||
"zen.mods.updated-value-observer",
|
"zen.mods.updated-value-observer",
|
||||||
"zen.mods.last-update",
|
"zen.mods.last-update",
|
||||||
"zen.view.compact.enable-at-startup",
|
"zen.view.compact.enable-at-startup",
|
||||||
|
"zen.urlbar.suggestions-learner",
|
||||||
"browser.newtabpage.activity-stream.trendingSearch.defaultSearchEngine"
|
"browser.newtabpage.activity-stream.trendingSearch.defaultSearchEngine"
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user