webbrowser_app.tests.test_selection.TestSelection.* flaky since oxide 1.8

Bug #1485984 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webbrowser-app (Ubuntu)
Fix Released
High
Olivier Tilloy

Bug Description

Since the upgrade to oxide 1.8, the webbrowser_app.tests.test_selection.TestSelection.* test case exhibits a flaky behaviour on devices (both mako in CI and krillin tested locally).

An example failure (from a CI run on mako): https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3109/testReport/junit/webbrowser_app.tests.test_selection/TestSelection/test_resize_selection/.

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :

stderr:

OxideQQuickLocationBarController::show: height is not greater than zero
qml: Loaded 5 UA override(s) from file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Web/ua-overrides-mobile.js
UbuntuClipboard - Got invalid serialized mime data. Ignoring it.
Failed to download QUrl( "http://test/favicon.ico" ) : "Host test not found"
UbuntuClipboard - Got invalid serialized mime data. Ignoring it.
WebContextMenu::Show: Content requested a context menu, but the application hasn't provided one

test log:

08:44:12.329 WARNING testcase:181 - Process manager backend unavailable, application snapshot support disabled.
08:44:12.341 INFO _launcher:373 - Attempting to launch application 'webbrowser-app' with arguments '--desktop_file_hint=/usr/share/applications/webbrowser-app.desktop --new-session http://test/selection' as a normal process
08:44:12.377 INFO _launcher:431 - Launching process: ['/usr/bin/webbrowser-app', '-testability', '--desktop_file_hint=/usr/share/applications/webbrowser-app.desktop', '--new-session', 'http://test/selection']
08:44:23.194 INFO http_server:162 - "GET /selection HTTP/1.1" 200 -
08:44:37.564 INFO _launcher:544 - waiting for process to exit.
08:44:37.565 INFO _launcher:567 - Killing process 5784

traceback:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/webbrowser_app/tests/test_selection.py", line 37, in setUp
    self.selection = self.main_window.get_selection()
  File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 119, in get_selection
    return self.wait_select_single(Selection)
  File "/usr/lib/python3/dist-packages/autopilot/introspection/dbus.py", line 295, in wait_select_single
    return self.select_single(type_name, **kwargs)
  File "/usr/lib/python3/dist-packages/autopilot/introspection/dbus.py", line 244, in select_single
    raise StateNotFoundError(type_name_str, **kwargs)
autopilot.exceptions.StateNotFoundError: Object not found with name 'Selection'.

Changed in webbrowser-app (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote :

When the error happens, the selection rectangle isn’t drawn on screen.
The webview has registered a long press event though, as evidenced by this log:

    WebContextMenu::Show: Content requested a context menu, but the application hasn't provided one

Testing manually in the browser, the selection rectangle appears reliably on long press, so it seems to be an issue with the tests only, not with the functionality itself.

On devices, the way the autopilot tests simulate a long press event to summon the selection rectangle is like this:

    webview = self.main_window.get_current_webview()
    self.pointing_device.move_to_object(webview)
    self.pointing_device.press()
    time.sleep(1.5)
    self.pointing_device.release()

I tested various values for time.sleep() (increased it and decreased it), to no avail. Under 1.5 seconds, there are occurences where the webview doesn’t register a long press event. Higher values don’t seem to fix the issue either.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The linked branch removes entirely the selection mechanism, and the corresponding autopilot tests. When it lands, this issue will become invalid.

Changed in webbrowser-app (Ubuntu):
status: Confirmed → In Progress
Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.