Content-transformation-proxies and client side javascripts malfunctioning

Answered Content-transformation-proxies and client side javascripts malfunctioning

  • terça-feira, 6 de março de 2012 14:16
     
     
    <title>Untitled Page</title>

    Hi,
    I am Glad to hear about this initiative and your article. I guess it would be right to ask you some suggetion regarding a problem I got struck in the proess of developing a TestSuites-Automation-Framework. Automation-Framework is to verify BROWSER conformance to W3C Standards. A set of testcases, are authored upon understanding the STANDARD, and its IMPLEMENTATION. Framework testcases inside an "iFrame" of browser-under-test, and evaluates its result. Such results should be logged onto persistent storage, for which a PHP application is written for appending/creating files and data.

    But, this LOGGING is not possible when I run the testsuite from a mobile-phone that has a browser altering websites to display optimally on phones. In such a case, this LOGGING is not working in expected manner. I am referring to that content-altering-process-on-mobile as a PROXY-MODE.

    I pasted code-snippets for your reference.

    1. All the test-cases that are to be evaluated are specified in an Array named tests. Example,
      var tests = new Array("TestCase001.html", "TestCase002.html","TestCase003.html”, ---so on till--- ,"TestCase00n.html");
    2. Testcases are loaded one after another in an iFrame (1st feature, described in previous mail).
      • As loading a test-caseevery time in the same iFrame did not fire the load event (in proxy-mode); we are removing and re-creating the iFrame every time when it need to load a new test-case. This also ensures that un-necessary garbage is cleared and keeps memory afresh.
        /** Code to remove iframe from DOM and re-create to load next test **/ try { var fRef = document.getElementById(destFrame); document.body.removeChild(fRef); } catch(exception) { console.log("unable to remove child"); } try { var tFrame = document.createElement('iframe'); tFrame.setAttribute("id", destFrame); document.body.appendChild(tFrame); } catch(exception) { console.log("unable to add child"); }
      • Get the reference for next test-case and load it into iFrame.
        document.getElementById(destFrame).setAttribute(“src”, <>);
    3. Once a test-case loads, test-case evaluation logic runs (in iFrame’s context ) and notifies result of that test-case to its parent window (using “window.top” property).
      Now, we cache the result in a Javascript variable (2nd feature) and log the results on to a persistent storage for every ‘N’ number of cases using php (3rd feature, we are referring this as ‘chunk-logging’).
      Javascript AJAX API is used to POST the request to php file.It is observed that logging is not happening when running testsuite in “mobile-browser”.
      var fRef = document.getElementById("firstFrame"); fRef.setAttribute("src",<>+"?fileName=<>&_POST_TEST_RESULTS="+<>);

    Thanks in advance,
    K Chandrasekhar Omkar.
    kcomkar@gmail.com
    omkarkc.blogspot.com

Todas as Respostas

  • terça-feira, 6 de março de 2012 22:31
    Moderador
     
     Respondido
     

    Hi K Chandrasekhar Omkar:

    This forum handles requests related to Open Protocols Specifications documentation issues.

    The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx.

    You refer to “previous mail”, but that mail is not linked in this post, so we do not have enough context in this stand-alone post to determine your issue nor to evaluate if it’s in scope for this forum.

    Please provide more information which document your question is about so that we can handle it in this forum. If you question is not related to an open specification document or documents, you may want to post it to an AJAX related forum, like the following:

    http://forums.asp.net/1022.aspx/1?ASP+NET+AJAX+Ajax+Control+Toolkit


    Regards, Obaid Farooqi