Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-13552

BrowserSim: Ripple integration

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 4.1.0.Beta1
    • None
    • browsersim
    • None

    Description

      Ripple is an emulator, which provides mobile environment (such as Cordova API) to HTML applications.
      Ripple extension for Chrome is written in HTML/JavaScript with usage of Chrome extensions API and some Chrome-only API. When run as an extension, Ripple looks like a mobile iframe in the center of a browser window, and several controls around this iframe, including Geolocation, Orientation and Messaging. These controls allow to change "answers" for queries to emulated API.

      On the high level our plan is to:
      1. get rid of dependencies to Chrome extensions API and Chrome-only API
      2. replace the mobile iframe with BrowserSim popup window
      3. implement missing pieces
      4. replace some Ripple controls with BrowserSim controls
      5. integrate our Ripple-BrowserSim simulator in Eclipse
      6. other issues

      More details follow:
      1. get rid of dependencies to Chrome extensions API and Chrome-only API
      This includes:

      • allow Ripple code to access window and document objects of Cordova applications. Resolved by hosting Ripple and Cordova applications on the same Jetty server
      • allowing cross-origin XHR from BrowserSim. We resolved this by implementation of a Jetty-based proxy
      • Web SQL API is deprecated and it is not available in BrowserSim on Windows. We resolved it by our own implementation of this API in pure JavaScript JBIDE-13813.
      • allow to upload files to simulate Cordova Camera API. The problem is that some Chrome API is not available in BrowserSim (an example is window.URL.createObjectURL(blob)). We resolved it by an upload file servlet in Jetty

      2. replace the mobile iframe with BrowserSim popup window

      • there is bug in SWT which leads to multiple popups being opened instead of one. Resolved. We already found a workaround for it
      • iframe should be removed from the control page. Resolved. The iframe all JS dependencies to it are removed.
      • need a way to change BrowserSim skin while running as popup. The problem is that when the skin is changing, we loose connection with the parent window. Resolved. Now we refresh the parent window after the skin is changed. After refresh the parent window tries to open a new popup, and we connect already created new skin to it.*

      3. implement missing pieces

      • Compas API does not work in both CordovaSim and original Ripple. Resolved actually it works - bad demo sample
      • Capture API (audio and video recording using an external app) does not work in both CordovaSim and original Ripple Resolved JBIDE-14300
      • Media API (audio playback and recording) does not work in CordovaSim now (not sure if it works in original Ripple) Not a bug JBIDE-14306
      • Bar code scanner? Resolved JBIDE-14362

      4. replace some Ripple controls with BrowserSim controls

      • the backbutton event should be fired when user presses the Back button in BrowserSim. Resolved
      • Ripple's orientation change should be replaced by BrowserSim's one. Resolved

      5. integrate our Ripple-BrowserSim simulator in Eclipse

      • provide an easy way to run our simulator from Eclipse, probably add something like "Open in CordovaSim" toolbar item/context menu Resolved JBIDE-14083

      6. other issues

      • CordovaSim should show an error if jetty port is not available. Resolved
      • A bug: if there are two Cordova projects in the workspace with index.html and we run CordovaSim for both these projects, than only one of the index.html files may be showed in both cases. The problem is that by default Jetty allows the If-modified-since header and the file with an earlier modification date will never be returned. Resolved by not returning this header.

      Attachments

        Issue Links

          Activity

            People

              yradtsevich Yahor Radtsevich (Inactive)
              yradtsevich Yahor Radtsevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: