Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.2
    • Component/s: Server
    • Labels:
      None

      Description

      Metadata attributes (name, version etc) should be read-only according to the specification.

      1. patch2.txt
        2 kB
        Paul Sharples
      2. patch.txt
        2 kB
        Scott Wilson

        Activity

        Hide
        Paul Sharples added a comment -

        Verifing this issue. Most of the tests now work apart from some which are mentioned at the end of WOOKIE-20. I have just rerun the tests in IE9 and the results are the same as when run in firefox 9.0.1

        Show
        Paul Sharples added a comment - Verifing this issue. Most of the tests now work apart from some which are mentioned at the end of WOOKIE-20 . I have just rerun the tests in IE9 and the results are the same as when run in firefox 9.0.1
        Hide
        Scott Wilson added a comment -

        I think this is as good as we can make it given browser limitations

        Show
        Scott Wilson added a comment - I think this is as good as we can make it given browser limitations
        Hide
        Scott Wilson added a comment -

        Thanks Paul - feel free to commit patch2.

        For (1) this seems to be caused by the last test, which uses preferences.clear() and then resets.

        For (2) I guess not as much of a problem for us - at least IE9 works OK.

        Show
        Scott Wilson added a comment - Thanks Paul - feel free to commit patch2. For (1) this seems to be caused by the last test, which uses preferences.clear() and then resets. For (2) I guess not as much of a problem for us - at least IE9 works OK.
        Hide
        Paul Sharples added a comment -

        OK, the patch as it stands will fail on IE8. All but the first widget fails with the error "Object doesnt support this method or property".
        As in other places in wookie-wrapper we need to catch it when Object.defineProperty fails. (the IE9 fix). (see patch2.txt above). With that in place the test instance gets further and only fails on the following one in IE8...

        http://dev.w3.org/2006/waf/widgets-api/test-suite/test-cases/ta-ah/ax/ax.wgt

        This is because of a problem in that widget which contains syntax which will not work in <IE9 (they need to update the widget to feature detect the browser - line 44) and replace it with.

        // prior to IE9 have to use attachEvent instead of addeventlistener for IE
        if (window.addEventListener){
        window.addEventListener("Storage", function()

        { fail("Test Failed because Storage event was fired") }, true);
        }
        else if (window.attachEvent){
        window.attachEvent("Storage", function(){ fail("Test Failed because Storage event was fired") }

        );
        }

        (BTW: If I do that manually in wookie, IE8 stops complaining)

        Two points

        (1) in all browsers I seem to get the following error in the eclipse console when i load the generated html text...
        [java] 10:41:53,179 WARN Runtime:89 - Detected possible orphaned reference to deleted object "[1183, 1184, 1185, 1186]" in "org.apache.wookie.beans.jpa.impl.WidgetInstanceImpl.preferences<element:class org.apache.wookie.beans.jpa.impl.PreferenceImpl>" of instance "1212".

        (2) There are more tests working in Firefox than in IE8. This almost certainly because the fix for IE8 in patch2.txt (line 48) does not enforce the read only mechanism.

        Show
        Paul Sharples added a comment - OK, the patch as it stands will fail on IE8. All but the first widget fails with the error "Object doesnt support this method or property". As in other places in wookie-wrapper we need to catch it when Object.defineProperty fails. (the IE9 fix). (see patch2.txt above). With that in place the test instance gets further and only fails on the following one in IE8... http://dev.w3.org/2006/waf/widgets-api/test-suite/test-cases/ta-ah/ax/ax.wgt This is because of a problem in that widget which contains syntax which will not work in <IE9 (they need to update the widget to feature detect the browser - line 44) and replace it with. // prior to IE9 have to use attachEvent instead of addeventlistener for IE if (window.addEventListener){ window.addEventListener("Storage", function() { fail("Test Failed because Storage event was fired") }, true); } else if (window.attachEvent){ window.attachEvent("Storage", function(){ fail("Test Failed because Storage event was fired") } ); } (BTW: If I do that manually in wookie, IE8 stops complaining) Two points (1) in all browsers I seem to get the following error in the eclipse console when i load the generated html text... [java] 10:41:53,179 WARN Runtime:89 - Detected possible orphaned reference to deleted object " [1183, 1184, 1185, 1186] " in "org.apache.wookie.beans.jpa.impl.WidgetInstanceImpl.preferences<element:class org.apache.wookie.beans.jpa.impl.PreferenceImpl>" of instance "1212". (2) There are more tests working in Firefox than in IE8. This almost certainly because the fix for IE8 in patch2.txt (line 48) does not enforce the read only mechanism.
        Hide
        Scott Wilson added a comment -

        Yes, thats right

        Show
        Scott Wilson added a comment - Yes, thats right
        Hide
        Paul Sharples added a comment -

        Do you mean once you've run the tests in eclipse, paste the generated html at the bottom of the eclipse console into a file and load into a browser to test?

        Show
        Paul Sharples added a comment - Do you mean once you've run the tests in eclipse, paste the generated html at the bottom of the eclipse console into a file and load into a browser to test?
        Hide
        Scott Wilson added a comment -

        OK, I can make this happen using the patch attached, however I'd appreciate it if someone can test on IE7/8/9 before I commit it.

        To test, run the "Widget Interface" tests and look at the HTML output in the browser. Quite a few tests will fail anyway still, the important ones here are shortName_attrreadonly, version_attrreadonly (etc) and associated "get" tests like ag, ah, ai etc.

        Show
        Scott Wilson added a comment - OK, I can make this happen using the patch attached, however I'd appreciate it if someone can test on IE7/8/9 before I commit it. To test, run the "Widget Interface" tests and look at the HTML output in the browser. Quite a few tests will fail anyway still, the important ones here are shortName_attrreadonly, version_attrreadonly (etc) and associated "get" tests like ag, ah, ai etc.

          People

          • Assignee:
            Unassigned
            Reporter:
            Scott Wilson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development