← Back to team overview

touch-packages team mailing list archive

[Bug 1447557] Re: Make HTTPRequestHandler in autopilot tests modular

 

** Also affects: webbrowser-app (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: webbrowser-app (Ubuntu)
       Status: New => Confirmed

** Changed in: webbrowser-app (Ubuntu)
   Importance: Undecided => Medium

** Changed in: webbrowser-app
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to webbrowser-app in Ubuntu.
https://bugs.launchpad.net/bugs/1447557

Title:
  Make HTTPRequestHandler in autopilot tests modular

Status in Web Browser App:
  Invalid
Status in webbrowser-app package in Ubuntu:
  Confirmed

Bug description:
  Currently the class http_server.HTTPRequestHandler in the autopilot
  tests has pieces of test code from all over the place.

  It should instead allow to register arbitrary functions that will be
  called when the request path matches a certain criteria.

  For example the setup for our current geolocation test would look
  something like this:

  def geolocation_path_handler(server):
              server.send_response(200)
              html = '<html><body><script>navigator.geolocation.getCurrentPosition(function r(p) {});</script></body></html>'
              server.send_html(html)

  self.server.register_path_handler("/geolocation",
  geolocation_path_handler)

To manage notifications about this bug go to:
https://bugs.launchpad.net/webbrowser-app/+bug/1447557/+subscriptions