Mozilla stuff

Uhm...

2014-10-17

Some git commands

To see all availabe branches (similar to available mercurial queues): git branch
To make a new branch: git branch branch_name
To go to a specific branch: git checkout branch_name

To add changes to a github pull request:
git add . (git add --all also removes entries when there are removed files)
git commit -m "your commit message"
git push https://github.com/mwargers/gaia.git branch_name

To see changed files between master and your branch:
git diff --name-status master..branch_name

To remove file from git: git rm file_name

How to prevent pushing changes to master (at least without warning):
git config push.default nothing

2014-10-14

https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches

https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches

update master

git fetch upstream
git merge upstream/master

Git vs Mercurial

Git Mercurial
git pull hg pull -u
git fetch hg pull
git reset --hard hg update -C
git revert hg backout
git add hg add (Only equivalent when is not tracked.)
git add Not necessary in Mercurial.
git reset Not necessary in Mercurial.
git add -i hg record
git commit -a hg commit
git commit --amend hg commit --amend
git blame hg blame or hg annotate
git blame -C (closest equivalent): hg grep --all
git bisect hg bisect
git rebase --interactive hg histedit (Requires the HisteditExtension.)
git stash hg shelve (Requires the ShelveExtension or the AtticExtension.)
git merge hg merge
git cherry-pick hg graft
git rebase hg rebase -d (Requires the RebaseExtension.)
git format-patch and git send-mail hg email -r (Requires the PatchbombExtension.)
git am hg mimport -m (Requires the MboxExtension and the MqExtension. Imports patches to mq.)
git checkout HEAD hg update
git log -n hg log --limit n
git push hg push

How to create a patch from a github pull request

https://coderwall.com/p/6aw72a

2014-10-13

Local content over local web server

Local content over local web server:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/resources/

https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/cost_control/test_cost_control_reset_wifi.py
search = Search(self.marionette)
search.launch()
search.go_to_url(self.marionette.absolute_url('mozilla.html'))

2014-10-03

Git regarding forking a repo

2014-09-09

adb shell
stop b2g
cd /data/b2g/mozilla/*.default/
echo 'user_pref("services.mobileid.loglevel", "Debug"); user_pref("services.hawk.loglevel", "Debug"); user_pref("services.hawk.log.sensitive", true);' >> prefs.js
start b2g
exit

2014-07-01

PAC file = Proxy auto-config file

http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_File


.bashrc edit on the emulator to find ssltunnel


Because of bug 1002545 :
You need to build your own Firefox desktop build to get an ssltunnel version
That's why you need to edit .bashrc on the b2g emulator:
PATH="$HOME/bin:$HOME/B2G/out/host/linux-x86/bin:$PATH"

Mtbf = mean time between failures

2014-06-27

Working b2g emulator

To get working b2g emulator:
- Use Ubuntu14 VMWare image, 60GB storage, 4GB memory
- Follow https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS
 - Build mozilla-central firefox also on it (see bug 1002545):
# hg clone http://hg.mozilla.org/mozilla-central
# cd mozilla-central
# ./mach bootstrap
# ./mach build
# export XULRUNNER_DIRECTORY=$PWD/obj-x86_64-unknown-linux-gnu/dist
 
Then go to B2G folder and run ./mach mochitest-remote 

2014-06-25

Loop Client testing

Between FirefoxOS Phone (Flame) and Firefox Nightly desktop

  1. In terminal: git clone https://github.com/mozilla-b2g/firefoxos-loop-client
  2. Follow instructions at: https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Quick_setup
  3. Add the packaged app firefoxos-loop-client
  4. Make a call on the firefoxos-loop client
  5. Open Firefox Nightly on desktop, open the url that was shared with the firefoxos-loop-client app url.
  6.  

2011-10-30

Turning Windows Search off also can help.

2011-10-24

checking whether the C++ compiler (cl ) works... rm: cannot lstat `conftest.exe
': Permission denied
no
configure: error: installation or configuration problem: C++ compiler cannot cre
ate executables.
*** Fix above errors and then restart with "make -f client.mk buil
d"

http://stackoverflow.com/questions/1121386/unable-to-copy-file-reference-dll-to-bin-reference-dll-the-process-cannot-acces

Easy fix for Windows 7: Start the service "Application Experience" . Search for "Services" in "Control Panel".

2011-10-05

general.skins.selectedSkin pref
honeycomb/1.0
classic/1.0
gingerbread/1.0


+pref("browser.ui.layout.tablet", -1); // on: 1, off: 0, auto: -1

2011-07-22

First of all, set the landscape full keyboard mode off so that the Virtual Keyboard does not take the whole screen. For this go to about:config and set: "widget.ime.android.landscape_fullscreen=0" and "widget.ime.android.fullscreen_threshold=300">

2011-04-14

Boris Zbarsky

to dev-platform
show details 4:16 PM (1 hour ago)

On 4/14/11 10:00 AM, Henri Sivonen wrote:
In the spec, there a four main objects involved in a document load and
navigation:
1) browsing context
2) WindowProxy (aka. outer window)
3) Window (aka. inner window)
4) Document

Each browsing context has a WindowProxy. Each Document has a Window.

Is that last bit true for documents returned via XMLHttpRequest, say?


An nsDocShell corresponds exactly to a browsing context, right?

Yes.


Does an nsIContentViewer correspond exactly to the spec's (inner) Window for the
purpose of the loading machinery even though the JS object corresponding
to Window is an nsGlobalWindow marked as being of the inner flavor?

An nsIContentViewer corresponds in lifetime to a document, sort of (some documents have no associated content viewer, and documents in general can outlive their content viewer if someone just holds on to them, but for purposes of loading machinery the correspondence is correct I think).


In the spec, a Window has a 1-to-1 correspondence to a Document except
when the Window's document changes from the initial about:blank into
another Document. Does the same hold for nsIContentViewer?

No.


Does it also get coupled 1-to-1 to an nsIDocument except for the initial about:blank?

No. The initial about:blank and the document that actually loads have different content viewers.


Have I understood correctly that an nsIContentViewer is always also an
nsIDocumentViewer and always an DocumentViewerImpl?

Yes, in our implementation. Modulo binary extensions, of course.


(What's the point of
having separate nsIContentViewer and nsIDocumentViewer interfaces?)

I believe at one point (before my time, I think) there was a plan to have non-document viewers (e.g. for full-page images, full-page plugins, whatever). I don't believe there is such a plan anymore. Certainly not on my part!

2011-03-10

browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.activateRemoteFrame()

2011-02-10

$ python runtests.py --help
Usage: Usage instructions for runtests.py.
All arguments are optional.
If --chrome is specified, chrome tests will be run instead of web content tests.

If --browser-chrome is specified, browser-chrome tests will be run instead of we
b content tests.
See for details on the logg
ing levels.

Options:
-h, --help show this help message and exit
--xre-path=XREPATH absolute path to directory containing XRE (probably
xulrunner)
--symbols-path=SYMBOLSPATH
absolute path to directory containing breakpad
symbols, or the URL of a zip file containing symbols
--debugger=DEBUGGER use the given debugger to launch the application
--debugger-args=DEBUGGERARGS
pass the given args to the debugger _before_ the
application on the command line
--debugger-interactive
prevents the test harness from redirecting stdout and
stderr for interactive debuggers
--setpref=PREF=VALUE defines an extra user preference
--close-when-done close the application when tests are done running
--appname=APP absolute path to application, overriding default
--utility-path=UTILITYPATH
absolute path to directory containing utility programs
(xpcshell, ssltunnel, certutil)
--certificate-path=CERTPATH
absolute path to directory containing certificate
store to use testing profile
--log-file=FILE file to which logging occurs
--autorun start running tests when the application starts
--timeout=TIMEOUT per-test timeout in seconds
--total-chunks=TOTALCHUNKS
how many chunks to split the tests up into
--this-chunk=THISCHUNK
which chunk to run
--chunk-by-dir=CHUNKBYDIR
group tests together in the same chunk that are in the
same top chunkByDir directories
--shuffle randomize test order
--console-level=LEVEL
one of DEBUG, INFO, WARNING, ERROR, FATAL to determine
the level of console logging
--file-level=LEVEL one of DEBUG, INFO, WARNING, ERROR, FATAL to determine
the level of file logging if a file has been
specified, defaulting to INFO
--chrome run chrome Mochitests
--test-path=TESTPATH start in the given directory's tests
--browser-chrome run browser chrome Mochitests
--a11y run accessibility Mochitests
--setenv=NAME=VALUE sets the given variable in the application's
environment
--browser-arg=ARG provides an argument to the test application
--leak-threshold=THRESHOLD
fail if the number of bytes leaked through refcounted
objects (or bytes in classes with MOZ_COUNT_CTOR and
MOZ_COUNT_DTOR) is greater than the given number
--fatal-assertions abort testing whenever an assertion is hit (requires a
debug build to be effective)
--extra-profile-file=EXTRAPROFILEFILES
copy specified files/dirs to testing profile
--profile-path=PROFILEPATH
Directory where the profile will be stored.This
directory will be deleted after the tests are finished
--use-vmware-recording
enables recording while the application is running
inside a VMware Workstation 7.0 or later VM

2010-09-24

Handy page:


https://wiki.mozilla.org/Auto-tools/Projects/Android_Parts_Bucket#To_put_an_android_unit_test_together

2010-09-23

$ python runtestsremote.py --help
reconnecting socket
unable to connect socket
Usage: Usage instructions for runtests.py.
All arguments are optional.
If --chrome is specified, chrome tests will be run instead of web content tests.

If --browser-chrome is specified, browser-chrome tests will be run instead of we
b content tests.
See for details on the logg
ing levels.

Options:
-h, --help show this help message and exit
--xre-path=XREPATH absolute path to directory containing XRE (probably
xulrunner)
--symbols-path=SYMBOLSPATH
absolute path to directory containing breakpad
symbols, or the URL of a zip file containing symbols
--debugger=DEBUGGER use the given debugger to launch the application
--debugger-args=DEBUGGERARGS
pass the given args to the debugger _before_ the
application on the command line
--debugger-interactive
prevents the test harness from redirecting stdout and
stderr for interactive debuggers
--setpref=PREF=VALUE defines an extra user preference
--close-when-done close the application when tests are done running
--appname=APP absolute path to application, overriding default
--utility-path=UTILITYPATH
absolute path to directory containing utility programs
(xpcshell, ssltunnel, certutil)
--certificate-path=CERTPATH
absolute path to directory containing certificate
store to use testing profile
--log-file=FILE file to which logging occurs
--autorun start running tests when the application starts
--timeout=TIMEOUT per-test timeout in seconds
--total-chunks=TOTALCHUNKS
how many chunks to split the tests up into
--this-chunk=THISCHUNK
which chunk to run
--chunk-by-dir=CHUNKBYDIR
group tests together in the same chunk that are in the
same top chunkByDir directories
--shuffle randomize test order
--console-level=LEVEL
one of DEBUG, INFO, WARNING, ERROR, FATAL to determine
the level of console logging
--file-level=LEVEL one of DEBUG, INFO, WARNING, ERROR, FATAL to determine
the level of file logging if a file has been
specified, defaulting to INFO
--chrome run chrome Mochitests
--test-path=TESTPATH start in the given directory's tests
--browser-chrome run browser chrome Mochitests
--a11y run accessibility Mochitests
--setenv=NAME=VALUE sets the given variable in the application's
environment
--browser-arg=ARG provides an argument to the test application
--leak-threshold=THRESHOLD
fail if the number of bytes leaked through refcounted
objects (or bytes in classes with MOZ_COUNT_CTOR and
MOZ_COUNT_DTOR) is greater than the given number
--fatal-assertions abort testing whenever an assertion is hit (requires a
debug build to be effective)
--extra-profile-file=EXTRAPROFILEFILES
copy specified files/dirs to testing profile
--profile-path=PROFILEPATH
Directory where the profile will be stored.This
directory will be deleted after the tests are finished
--use-vmware-recording
enables recording while the application is running
inside a VMware Workstation 7.0 or later VM
--remote-app-path=REMOTEAPPPATH
Path to remote executable relative to device root
using only forward slashes. Either this or app must be
specified but not both
--deviceIP=DEVICEIP ip address of remote device to test
--devicePort=DEVICEPORT
port of remote device to test
--remote-product-name=REMOTEPRODUCTNAME
The executable's name of remote product to test -
either fennec or firefox, defaults to fennec
--remote-logfile=REMOTELOGFILE
Name of log file on the device relative to the device
root. PLEASE ONLY USE A FILENAME.
--remote-webserver=REMOTEWEBSERVER
ip address where the remote web server is hosted at
--http-port=HTTPPORT ip address where the remote web server is hosted at
--ssl-port=SSLPORT ip address where the remote web server is hosted at

2010-09-16

/var/lib/hildon-app-mgr/nokia-domain-system "fennec"

2010-05-20

https://wiki.mozilla.org/Mobile/Fennec_Unittests#Maemo

https://wiki.mozilla.org/Mobile/Fennec_Reftests#Porting_tests_to_N800

2010-05-05

ls -a
home/user/.mozilla/
rm -r fennec

2010-04-29

 * formhelper.enabled
* formhelper.autozoom.enabled
* formhelper.restorezoom.enabled

2010-04-21

What I've noticed is that I can't seem to run fennec1.1b1 build 2, directly after uninstalling a fennec 1.93 trunk build, unless I restart the whole maemo os

2010-04-17

https://developer.mozilla.org/En/Mobile

Overriding extension compatibility can be done, by adding extensions.checkCompatibility.1.1b=true to about:config
Plugins can be enabled by setting plugin.disable=false in about:config.
You need to restart Fennec to take that change into effect.