[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Running WebGL conformance tests from the command line




On 9/27/12 10:41 PM, Kenneth Russell wrote:
Could you post some pointers to code which does this? Or even better,
would you be willing to contribute a little code to the harness which
generates a profile with the desired preferences?

There's code at that http://hg.mozilla.org/mozilla-central/file/510300b96e62/build/automation.py.in#l357 that does it. But that needs a lot more complexity and configurability than you really need here. For your purposes, I think the following should work fine:


----------------------------------------------------------
#! /bin/bash
# Do a "silent" run that will just create a new profile and exit
profilepath=/tmp/my-test-profile
prefs=${profilepath}/prefs.js

firefox -profile $profilepath -silent

# Make it not prompt you about not being the default browser
echo 'user_pref("browser.shell.checkDefaultBrowser", false);' >> $prefs

# Repeat following line for the prefs you want to set; not sure
# what the right ones are for the WebGL bits we care about here.
# If someone tells me that, I can fill in the exact user_pref lines
# needed.
echo 'user_pref("prefname", value);' >> $prefs
-----------------------------------------------------------

How future-proof would such code be? Is Firefox's profile format well specified?

I think what I quoted above should be reasonably future-proof. I can't make guarantees obviously, but we have no plans to move to storing the preference file in a different format, and that format has been around for 15+ years now. The most likely things to go away would be the -profile option or -silent option, I guess, and again I know of no plans to get rid of them.


-Boris

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------