RazrFalcon / resvg-test-suite

resvg test suite
https://razrfalcon.github.io/resvg-test-suite/svg-support-table.html
MIT License
23 stars 11 forks source link

Test against Firefox #21

Closed JoKalliauer closed 4 years ago

JoKalliauer commented 4 years ago

I try to use Firefox, but it does not work out.

I closed all Firefox-sessions.

I use /usr/lib/firefox/firefox for firefox, see Screenshot from 2020-03-09 16-34-01

I can open firefox using /usr/lib/firefox/firefox.

I get the information "Invalid Image: /home/jkalliau/Documents/GitHub/resvg-test-suite/tools/vdiff/firefox.png" Screenshot from 2020-03-09 16-42-15

But this file /home/jkalliau/Documents/GitHub/resvg-test-suite/tools/vdiff/firefox.png does not exist, but however if I copy "screnshot.png" to "firefox.png" and refresh with ctrl & r it shows this image. Screenshot from 2020-03-09 16-44-12

But if I refresh again with ctrl & r I do not see any image again.

Might it be that the image get rendered at a different place?

RazrFalcon commented 4 years ago

You should use Firefox < 61. Later versions have a broken screenshot feature.

JoKalliauer commented 4 years ago

I extracted https://ftp.mozilla.org/pub/firefox/releases/60.9.0esr/linux-x86_64/de/ in /home/jkalliau/prgm/firefox and it works. ;-)

Can I tell this firefox-version somehow to not update if I open it?

My default-browser is firefox (I know some prefer chrome) and I got some rendering-problems when my default browser /usr/bin/firefox/firefox is open, can I tell FF60 to be a portable version with local user-settings?

RazrFalcon commented 4 years ago

No idea.

JoKalliauer commented 4 years ago

I could tell firefox to not update via https://stackoverflow.com/a/44097096/6747994 but that would also affect my current firefox-browser.

However on Linux there is a possibility to run it portable, see https://wiki.ubuntuusers.de/Portable_Firefox/

But this needs to send firefox two options -no-remote -profile "$PWD/profilordner", otherwise it will not render anything as long as I have another firefox-window open.

In vdif-terminal I get

firefox: *** You are running in headless mode.
Firefox wird bereits ausgef�hrt, reagiert aber nicht. Um ein neues Fenster �ffnen zu k�nnen, m�ssen Sie zuerst den bestehenden Firefox-Prozess beenden oder Ihren Computer neu starten.

If I have another firefox-window open.

Anyway: @RazrFalcon can you tell me where to add `-no-remote -profile "/home/jkalliau/prgm/firefox-portable/profilordner"´ to firefox I assume https://github.com/RazrFalcon/resvg-test-suite/blob/master/tools/vdiff/src/render.cpp#L93 - L100

RazrFalcon commented 4 years ago

I guess it should look like this:

QString out = Process::run(data.convPath, {
    "--no-remote", 
    "--profile", "/home/jkalliau/prgm/firefox-portable/profilordner",
    "--headless",
    "--window-size",
    QString("%1,%2").arg(w).arg(h),
    "--screenshot",
    QFileInfo(outImg).absoluteFilePath(),
    data.imgPath,
}, true);
JoKalliauer commented 4 years ago

@RazrFalcon Thanks works perfectly (also if I have another firefox open)