tests: Replace "for each" construct
It is no longer supported by recent mozjs versions, so replace it with a regular for loop to unbreak the tests. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
This commit is contained in:
parent
5d1626aba1
commit
2e45be96b6
@ -81,16 +81,16 @@ function test() {
|
|||||||
tbox = new St.BoxLayout({ style: 'spacing: 20px;' });
|
tbox = new St.BoxLayout({ style: 'spacing: 20px;' });
|
||||||
vbox.add(tbox);
|
vbox.add(tbox);
|
||||||
|
|
||||||
for each (let s in backgroundSizes)
|
for (let s of backgroundSizes)
|
||||||
addTestCase(image, size, s, false);
|
addTestCase(image, size, s, false);
|
||||||
for each (let s in backgroundSizes)
|
for (let s of backgroundSizes)
|
||||||
addTestCase(image, size, s, true);
|
addTestCase(image, size, s, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addTestImage(image) {
|
function addTestImage(image) {
|
||||||
const containerSizes = [[100, 100], [200, 200], [250, 250], [100, 250], [250, 100]];
|
const containerSizes = [[100, 100], [200, 200], [250, 250], [100, 250], [250, 100]];
|
||||||
|
|
||||||
for each (let size in containerSizes)
|
for (let size of containerSizes)
|
||||||
addTestLine(image, size);
|
addTestLine(image, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ function test() {
|
|||||||
function iconRow(icons, box_style) {
|
function iconRow(icons, box_style) {
|
||||||
let hb = new St.BoxLayout({ vertical: false, style: box_style });
|
let hb = new St.BoxLayout({ vertical: false, style: box_style });
|
||||||
|
|
||||||
for each (let iconName in icons) {
|
for (let iconName of icons) {
|
||||||
hb.add(new St.Icon({ icon_name: iconName,
|
hb.add(new St.Icon({ icon_name: iconName,
|
||||||
icon_size: 48 }));
|
icon_size: 48 }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user