Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6878229

For FF3, case FunctionalTest/ModifyDOM, Node.getAttributes can't get attribute "class".

XMLWordPrintable

    • x86
    • linux_ubuntu, windows

      Product: java
      Category: java_plugin
      Subcategory: plugin2
       
      Component: deployment/plugin
      Java version: 6u18b01
       
       
      Platform: ubuntu8.04-i586/FF3.0.8
      Hardware: x86
      Description:
      For FF3, case FunctionalTest/ModifyDOM, Node.getAttributes can't get attribute "class".
       
       
      Here's a failed case about DOM.
      For div tag, two attributes "id" and "class" are created, but Node.getAttributes() only return one.
      It can't get the attribute "class".

      Give code for reference:
      ...
      HTMLDivElement ed = (HTMLDivElement) doc.createElement("div");
      ed.setAttribute("id", "jitu"); //This will be detected.
      ed.setAttribute("class", "employee"); //This will not be detected.
      System.out.println("span get attritbute======" +
      es.getAttribute("class")); //I can get attribute here.
      ...

      NamedNodeMap attrs = root.getAttributes();
      if (attrs != null) {
           int len = attrs.getLength(); // For this test, length is 1 not 2.
           System.out.println("current attr num is===" + len);
           for (int i = 0; i < len; i++) {
               Node attr = attrs.item(i);
               System.out.println("attr value is===" +((Attr) attr).getValue() );
      ...


      On other platforms:
      Windows-XP-pro-sp3 with IE 7: pass
      win-xp-home-sp3 with FF3.5.2: fail
      OpenSolaris-sparc-2009.06 with FF 3.0: fail
       
       
      Browser: FF3
       
      Steps to reproduce:
        install jre6u18b01.
        run this case in automation mode, or access this html in browser.
      Result location:
      http://218.247.206.194:8080/export2/results/deploy_plugin/automation/6u18/b01/ubuntu8.04-i586/Standalone_deployment_plugin_2009_08_31_00_29_18_rerun1/
      change it to Java plugin category
      We verified in IE browser, we can see the following two outputs:
      ---------
      DIV element ID test PASSED
      DIV element class test PASSED
      --------

      But in FF, we can only see the first output line.

      We attatched the complete java source code and html launch file.

            vdrozdov Victor Drozdov (Inactive)
            tonyli Tony Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: