Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions testData/deviceReporter/acceptanceTests/windows_firefox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
{
"id": "org.mozilla.cloud4firefox"
}
]
4 changes: 4 additions & 0 deletions testData/deviceReporter/installedSolutions.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
"id": "org.chrome.cloud4chrome"
},

{
"id": "org.mozilla.cloud4firefox"
},

{
"id": "com.android.settings.secure"
},
Expand Down
23 changes: 23 additions & 0 deletions testData/preferences/firefox.json
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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong indent

"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.
86 changes: 86 additions & 0 deletions testData/solutions/win32.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong indent

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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"
]
}
}
}
3 changes: 2 additions & 1 deletion tests/platform/index-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ module.exports = [
"windows/windows-builtIn-testSpec.js",
"windows/windows-jaws-testSpec.js",
"windows/windows-nvda-testSpec.js",
"windows/windows-maavis-testSpec.js"
"windows/windows-maavis-testSpec.js",
"windows/windows-firefox-testSpec.js"
];
21 changes: 21 additions & 0 deletions tests/platform/windows/configs/windows-firefox-config.json
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"
]
}
8 changes: 8 additions & 0 deletions tests/platform/windows/configs/windows-firefox-config.txt
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.
105 changes: 105 additions & 0 deletions tests/platform/windows/windows-firefox-testSpec.js
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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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);
11 changes: 11 additions & 0 deletions tests/platform/windows/windows-firefox-testSpec.txt
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