-
Notifications
You must be signed in to change notification settings - Fork 62
Firefox extension #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Firefox extension #383
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [ | ||
| { | ||
| "id": "org.mozilla.cloud4firefox" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "flat": { | ||
| "contexts": { | ||
| "gpii-default": { | ||
| "name": "Default preferences", | ||
| "preferences": { | ||
| "http://registry.gpii.net/applications/org.mozilla.cloud4firefox": { | ||
| "screenReaderTTSEnabled": false, | ||
| "highContrastEnabled": true, | ||
| "invertColours": false, | ||
| "magnifierEnabled": true, | ||
| "magnification": 1, | ||
| "fontSize": "L", | ||
| "simplifier": false, | ||
| "lineheight": 3, | ||
| "backgroundColour": "#000000", | ||
| "foregroundColour": "#FFFF00" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Cloud4Firefox | ||
|
|
||
| ## Details | ||
|
|
||
| * __Name__: cloud4Firefox | ||
| * __Id__: org.mozilla.cloud4firefox | ||
| * __Platform__: Web | ||
| * __Contact__: José Antonio Gutiérrez Dueñas <[email protected]> | ||
|
|
||
| ## Description | ||
| The Firefox extension for Firefox is a component installable in the web browser. This extension establishes a connection with GPII to get the active preferences. These preferences are used, by the extension, to adapt the web browser content, I mean, the web site interfaces. | ||
|
|
||
| Useful links: | ||
|
|
||
| * [Firefox extensions developer](https://developer.mozilla.org/en-US/Add-ons) | ||
| * [Source code at github.com](https://github.com/GutiX/firefox4cloud) | ||
|
|
||
| ## Integration | ||
| To install the Firefox extension, make the following steps. | ||
|
|
||
| * Download the zip file from https://github.com/GutiX/firefox4cloud/archive/master.zip | ||
| * Extract the zip file in a folder of your choice. In the project root folder should be a xpi file called "cloud4firefox.xpi". | ||
| * In the extension section of the Firefox browser (Menu->Add-ons->extensions), click on the ‘settings’ icon in the upper right corner and select the option "Install add-on from File...". | ||
| * Select the "cloud4firefox.xpi" file that you unzipped in step 2 | ||
|
|
||
|
|
||
| ## Testing | ||
| When using a NP set that makes use of the cloud4firefox extension, the Firefox browser should be launched and configured properly by taking into account the settings included in that NP set. | ||
| One user profiles with a set of Needs & Preferences have been provided in order to properly perform the tests. | ||
| These user profiles have as follows: | ||
|
|
||
| ### Firefox | ||
| NP set located at universal's testData/preferences/firefox1.json | ||
|
|
||
| * When logging in, Firefox browser should be started automatically and you should see the magnification theme. | ||
| * When logging out, default settings will be restored. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1318,5 +1318,91 @@ | |
| "restoreSettings" | ||
| ] | ||
| } | ||
|
|
||
| }, | ||
|
|
||
| "org.mozilla.cloud4firefox": { | ||
| "name": "Cloud4all firefox extension", | ||
| "contexts": { | ||
| "OS": [{ | ||
| "id": "win32", | ||
| "version": ">=5.0" | ||
| }] | ||
| }, | ||
| "settingsHandlers": [ | ||
| { | ||
| "type": "gpii.settingsHandlers.webSockets", | ||
| "options": { | ||
| "path": "org.mozilla.cloud4firefox" | ||
| }, | ||
| "capabilities": [ | ||
| "applications.org\\.mozilla\\.cloud4firefox.id" | ||
| ], | ||
| "capabilitiesTransformations": { | ||
| "screenReaderTTSEnabled":"http://registry\\.gpii\\.net/common/screenReaderTTSEnabled", | ||
| "magnifierEnabled": "http://registry\\.gpii\\.net/common/magnifierEnabled", | ||
| "magnification": "http://registry\\.gpii\\.net/common/magnification", | ||
| "fontSize": { | ||
| "transform":{ | ||
| "type":"gpii.transformer.quantize", | ||
| "inputPath":"http://registry\\.gpii\\.net/common/fontSize", | ||
| "ranges":[ | ||
| { | ||
| "upperBound":14, | ||
| "output":"M" | ||
| }, | ||
| { | ||
| "upperBound":24, | ||
| "output":"L" | ||
| }, | ||
| { | ||
| "output":"XL" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "backgroundColour": { | ||
| "transform": { | ||
| "type": "fluid.transforms.valueMapper", | ||
| "inputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", | ||
| "options": { | ||
| "white-black": "#000000", | ||
| "black-white": "#FFFFFF", | ||
| "yellow-black": "#000000", | ||
| "black-yellow": "#FFFF00" | ||
| } | ||
| } | ||
| }, | ||
| "foregroundColour": { | ||
| "transform": { | ||
| "type": "fluid.transforms.valueMapper", | ||
| "inputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", | ||
| "options": { | ||
| "white-black": "#FFFFFF", | ||
| "black-white": "#000000", | ||
| "yellow-black": "#FFFF00", | ||
| "black-yellow": "#000000" | ||
| } | ||
| } | ||
| }, | ||
|
|
||
| "highContrastEnabled": "http://registry\\.gpii\\.net/common/highContrastEnabled", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indent
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For all "wrong indent" comments, I have been looking at the original files and these is fine. Is possible that the github modifies these files?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it is not possible. You have committed tabs rather than spaces in these files - you need to set your editor so that it produces an indent of 4 spaces and does not try to reconvert back to tabs. See this line in your committed file: https://github.com/GutiX/universal/blob/Firefox-Extension/testData/solutions/win32.json#L1389 |
||
| "invertColours": "http://registry\\.gpii\\.net/common/invertColours", | ||
| "tracking":"display.screenEnhancement.tracking" | ||
| } | ||
| } | ||
| ], | ||
| "lifecycleManager" : { | ||
| "start": [ | ||
| "setSettings", | ||
| { | ||
| "type": "gpii.launch.exec", | ||
| "command": "\"${{registry}.HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\firefox.exe\\}\" http://wiki.gpii.net/" | ||
| } | ||
| ], | ||
| "stop": [ | ||
| "restoreSettings" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "typeName": "acceptanceTests.windows.firefox", | ||
| "options": { | ||
| "components": { | ||
| "server": { | ||
| "options": { | ||
| "components": { | ||
| "deviceReporter": { | ||
| "options": { | ||
| "installedSolutionsUrl": "file://%root/../../../testData/deviceReporter/acceptanceTests/windows_firefox.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "includes": [ | ||
| "${universal}/tests/configs/localInstall.json" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| This configuration file is used for testing the firefox extension in Windows | ||
|
|
||
| It includes to the basic localInstall setup for acceptance tests (modifying the | ||
| preferences folder used), which in turn includes the standard development | ||
| config file (running GPII locally, using development setup). | ||
|
|
||
| This config sets the device reporter file to be 'windows_firefox.json', which will report | ||
| the Cloud4all Firefox extension for Mozilla Firefox as being installed on the system. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| /* | ||
| GPII Integration and Acceptance Testing | ||
|
|
||
| Copyright 2014 Emergya | ||
|
|
||
| Licensed under the New BSD license. You may not use this file except in | ||
| compliance with this License. | ||
|
|
||
| You may obtain a copy of the License at | ||
| https://github.com/gpii/universal/LICENSE.txt | ||
| */ | ||
|
|
||
| "use strict"; | ||
| var fluid = require("universal"), | ||
| gpii = fluid.registerNamespace("gpii"); | ||
|
|
||
| gpii.loadTestingSupport(); | ||
|
|
||
| fluid.registerNamespace("gpii.tests.windows.firefox"); | ||
|
|
||
|
|
||
|
|
||
| gpii.tests.windows.firefox = [ | ||
| { | ||
| name: "Acceptance test for background color change in firefox", | ||
| userToken: "chrome_high_contrast", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be better if we add a few firefox-specific NP sets rather than re-using the NP sets for chrome. |
||
| settingsHandlers: { | ||
| "gpii.settingsHandlers.webSockets": { | ||
| "data": [ | ||
| { | ||
| "settings": { | ||
| "screenReaderTTSEnabled": false, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indent |
||
| "highContrastEnabled": true, | ||
| "invertColours": false, | ||
| "magnifierEnabled": false, | ||
| "magnification": 1, | ||
| "fontSize": "M", | ||
| "backgroundColour": "#000000", | ||
| "foregroundColour": "#FFFFFF" | ||
| }, | ||
| "options": { | ||
| "path": "org.mozilla.cloud4firefox" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| processes: [] | ||
| }, | ||
| { | ||
| name: "Acceptance test for font size transformation in Chrome", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Firefox |
||
| userToken: "chrome_font_size", | ||
| settingsHandlers: { | ||
| "gpii.settingsHandlers.webSockets": { | ||
| "data": [ | ||
| { | ||
| "settings": { | ||
| "screenReaderTTSEnabled": false, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indent |
||
| "highContrastEnabled": false, | ||
| "invertColours": false, | ||
| "magnifierEnabled": false, | ||
| "magnification": 1, | ||
| "fontSize": "L" | ||
| }, | ||
| "options": { | ||
| "path": "org.mozilla.cloud4firefox" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| processes: [] | ||
| }, | ||
| { | ||
| name: "Acceptance test for magnification transformation in Chrome", | ||
| userToken: "chrome_magnification", | ||
| settingsHandlers: { | ||
| "gpii.settingsHandlers.webSockets": { | ||
| "data": [ | ||
| { | ||
| "settings": { | ||
| "screenReaderTTSEnabled": false, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indent |
||
| "highContrastEnabled": false, | ||
| "invertColours": false, | ||
| "magnifierEnabled": true, | ||
| "magnification": 2, | ||
| "fontSize": "M" | ||
| }, | ||
| "options": { | ||
| "path": "org.mozilla.cloud4firefox" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| processes: [] | ||
| } | ||
| ]; | ||
|
|
||
| module.exports = gpii.test.bootstrap({ | ||
| testDefs: "gpii.tests.windows.firefox", | ||
| configName: "windows-firefox-config", | ||
| configPath: "configs" | ||
| }, ["gpii.test.integration.testCaseHolder.windows"], | ||
| module, require, __dirname); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| windows-firefox-testSpec.txt | ||
|
|
||
| Descriptions: | ||
|
|
||
| * Solution: Cloud4all's Firefox extension for Mozilla Firefox (cloud4firefox) | ||
| * Configuration file: windows-firefox-config.json | ||
| * Device reporter file: windows_firefox.json | ||
| * NP sets: | ||
| * chrome_high_contrast | ||
| * chrome_font_size | ||
| * chrome_magnification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indent