Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-11751

Android: HTTPClient.onreadystatechange not dispatched

    Details

      Description

      The HTTPClient on Android is not dispatching the callback "onreadystatechange".

      There appears to be a typo in TiHTTPClient.java with the callback
      being named "onreadystatechanged" (notice the 'd' at the end).

      Along with fixing this typo we should create a new Anvil test
      case to catch future regressions in the HTTP callbacks. At least
      verify each one fires at the correct time.

        Activity

        Hide
        Ping Wang added a comment - - edited

        PR: https://github.com/appcelerator/titanium_mobile/pull/3420
        Steps for FR:
        1. Run the test case below on both rhino and v8:

        var xhr = Titanium.Network.createHTTPClient();
        xhr.onreadystatechange = function()
        {
           Ti.API.info("************************** xhr.onreadystatechange");
        }
        // open the client
        xhr.open('GET','http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf');
        	
        // send the data
        xhr.send();
        

        2. Check the console. Should see the log:

        I/TiAPI   (27676): ************************** xhr.onreadystatechange
        

        3. Run Anvil -> network_httpclient -> callbackTestForGETMethod/callbackTestForPOSTMethod. The tests should pass on v8. They fail on rhino for now. Already filed TIMOB-11758 for this issue.

        Show
        Ping Wang added a comment - - edited PR: https://github.com/appcelerator/titanium_mobile/pull/3420 Steps for FR: 1. Run the test case below on both rhino and v8: var xhr = Titanium.Network.createHTTPClient(); xhr.onreadystatechange = function() { Ti.API.info("************************** xhr.onreadystatechange"); } // open the client xhr.open('GET','http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf'); // send the data xhr.send(); 2. Check the console. Should see the log: I/TiAPI (27676): ************************** xhr.onreadystatechange 3. Run Anvil -> network_httpclient -> callbackTestForGETMethod/callbackTestForPOSTMethod. The tests should pass on v8. They fail on rhino for now. Already filed TIMOB-11758 for this issue.
        Show
        Ping Wang added a comment - 3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3423
        Hide
        Tamila Smolich (Inactive) added a comment -

        Closing as fixed. Tested on:
        Titanium Studio, build: 3.0.0.201211301903
        Titanium SDK, builds: 3.0.0.v20121204181658; 3.1.0.v20121203181001
        Devices: Motorola RAZR i XT890 (4.0.4)

        Show
        Tamila Smolich (Inactive) added a comment - Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, builds: 3.0.0.v20121204181658; 3.1.0.v20121203181001 Devices: Motorola RAZR i XT890 (4.0.4)

          People

          • Assignee:
            Ping Wang
            Reporter:
            Josh Roesslein
          • Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Poker Sessions

                This issue is currently not assigned to any Poker Session.