* Test plan for component: webapp-container

Dependents/Clients

All webapps, on both desktop and touch, ie:

Test Plan

This test plan is not supposed to be complete; use it to guide your manual testing so they dont miss big functional areas that are part in the component; also this should be used as guideline to inspire the exploratory testing which should be adapted smartly based on the real content of a MP

General verifications

Apply this to one of your favorite webapp, for example Facebook:

Config options

Desktop test cases

Online Accounts Integration

Core Webapps

For complete regression testing, complete the Core Webapps test plan in Process/Merges/TestPlans/webapps

Url State Saver support

Warning /!\ still not functional until the related branch lands.

Verify that a webapp does restart automatically to its last URL if ever it gets killed by the OOMKiller. See https://bugs.launchpad.net/webbrowser-app/+bug/1379428.

The issue was recorded as: https://bugs.launchpad.net/webbrowser-app/+bug/1379428

Click Hooks

The container has click hooks to:

* clean the application cache

* clean the application settings/resource files,

There are unittests in the webapp-container source package for those areas.

In order to manually test it, one needs a click webapp with those hooks defined.

1. create a webapp e.g. from qtcreator (or take an existing one),

2. add a webapp click hook to the manifest.json file in the appropriate section such as:

"webapp-container": "webapp-facebook.webapp"

in the list of click hooks,

3. add a webapp-facebook.webapp file (the name might obviously vary) with eg.

[{"uninstall": { "delete-cookies": true, "delete-cache": true } }]

which should trigger the (default) ~/.local/share/<app-id> ("delete-cookies" flag) and ~/.cache/<app-id> ("delete-cache" flag) to be removed.

You can toggle each flag as needed and verify that only the right actions are being performed (in this context, specific folder deletion).

Intent URI handling

A webapp has the capability to declare a handler for a specific intent (https://developer.chrome.com/multidevice/android/intents) URI. It can then have a 'local-scheme-filter.js' file that contains a potential small javascript snippet that is run when and intent URI it handles is receives (through the URI dispatcher):

1. install the click webapp attached in the bug report

https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1475708

2. create a simple qml app from QtCreator, just to have a simple mean to trigger a url dispatch. Open the Main.qml file, and replace the content of the BUtton onClicked's handler by:

Qt.openUrlExternally('intent://www.ubuntu.com/blabla/#Intent;scheme=http;package=com.canonical.apps.maps;end')

3. Run the application on the device and tap on the button

4. The webapp above should open and browse to google.com

URI dispatching

The url-dispatcher service can dispatch http urls to specific webapps that declaratively "own" their domain.

1. Check the current version of the Twitter webapp which will be used as a test bed for this

click info com.ubuntu.developer.webapps.webapp-twitter

2. Make sure that the twitter webapp is not opened

3. Open a shell session on the device and run the following command:

ubuntu-app-launch com.ubuntu.developer.webapps.webapp-twitter_webapp-twitter_1.1 http://twitter.com/14075928/status/635806536795824128

(you might have to tweak the webapp version number)

Make sure that the Twitter Webapp is started at the proper URL (not the main page),

4. Browse to the Twitter homepage,

5. Redo the test described in step 3) and check the result

Process/Merges/TestPlan/webapp-container (last edited 2015-11-10 17:11:40 by modemcable092)