Skip to content

oleksandra-cliqz/browser-core

 
 

Repository files navigation

Browser Core

Cliqz features are available on multiple platforms: browsers for Windows and Mac, (based on Mozilla/Firefox), for iOS (based on Mozilla/Firefox), and for Android (based on Lightning). In addition, the Cliqz for Firefox browser extension offers key Cliqz functions for Firefox users.

Browser Core is used in:

Documentation

Core modules

The Browser Core set of features consists of multiple independent modules. All modules underlie our strict privacy and user-first principles. The most important ones are:

A full list of modules can be found here. Please note that this list also includes experimental features that have not been and may not get released.

Requirements

Node version required: is >= 4.x

(use nvm to manage multiple node versions)

./fern.js install

Development

To start build system:

./fern.js serve

Release channel configuration file can be specified via optional argument (default is ./config/jenkins.json`):

./fern.js serve ./configs/amo.json

To run ember freshtab:

cd modules/fresh-tab-frontend ember serve -p 3000

You can then access freshtab under http://localhost:3000. Every change you make in fresh-tab-frontend folder will be live reloaded. However if you change anything in freshtab folder (backend), restart browser to see your changes.

To build ember freshtab: ./fern.js serve --freshtab ./configs/browser.json

By running above command you end up with minified distributed files in fresh-tab-frontend/dist folder. If you want these files to be moved into build/firefox folder, you also have to be running fern.

Flavours

All release channels configurations files are stored in ./configs folder. Choose your channel and build it with:

./fern.js build ./configs/<CHANNEL_NAME>.json

Examples:

  • ./fern.js build ./configs/amo.json
  • ./fern.js build ./configs/browser.json
  • ./fern.js build ./configs/mobile.json

Testing

you need to build extension with ./fern.js serve ./configs/jenkins.json configuration file in order to run tests.

Then open this URL to start tests chrome://cliqz/content/firefox-tests/index.html

Testing in Docker

It's now possible to run tests inside of docker locally. It can be useful for several reasons:

  1. Test any version of firefox without poluting your system.
  2. Make integration tests more robust as interacting with the browser while testing could break some tests.

The current setup allows you to:

  1. Choose a firefox version at build time.
  2. Run tests inside of docker.
  3. Connect and interact with running docker using any VNC client.
  4. Logs and test results are saved in the current extension directory.

Make sure the followings are available: fabric and jinja2. Also, if xtightvncviewer is available on your system, a vnc connection will automatically be created to the running docker so that you can inspect running tests.

Everything can be done with only one command but make sure your developement environment is setup correctly; that is, you can run ./fern.js build and it should build the extension successfuly (which will be attempted by the script if no build folder is present):

./run_tests_docker.sh <FIREFOX_VERSION>

You need bash4 on MacOS, you can do

brew install bash
/usr/local/bin/bash run_tests_docker.sh <FIREFOX_VERSION>

Where <FIREFOX_VERSION> can be any released version. For example: ./run_tests_docker.sh 47.0.1.

You can manually connect to docker with any VNC client on localhost, port 15900, password vnc.

Contributions

Please use the configuration from editorconfig. Make sure to check out the JavaScript Style Guide and ensure that your code complies with the rules.

About

Proprietary Cliqz features, shared across products including Cliqz browsers for Windows, Mac, Android and iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.9%
  • CSS 5.8%
  • HTML 5.6%
  • Python 0.5%
  • Groovy 0.1%
  • Shell 0.1%