[webkit-changes] cvs commit: LayoutTests/fast/dom createDocument-empty-expected.txt createDocument-empty.html

Anders andersca at opensource.apple.com
Tue Jan 3 02:06:36 PST 2006


andersca    06/01/03 02:06:36

  Modified:    .        ChangeLog
               dom/html/level2/core createDocument08-expected.txt
               dom/xhtml/level2/core createDocument08-expected.txt
  Added:       fast/dom createDocument-empty-expected.txt
                        createDocument-empty.html
  Log:
  2006-01-03  Anders Carlsson  <andersca at mac.com>
  
          Reviewed by Maciej.
  
          - Add test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
          createDocument fails with DOM Exception 5 when passed empty qname
  
          * dom/html/level2/core/createDocument08-expected.txt:
          * dom/xhtml/level2/core/createDocument08-expected.txt:
          These now fail.
  
          * fast/dom/createDocument-empty-expected.txt: Added.
          * fast/dom/createDocument-empty.html: Added.
  
  Revision  Changes    Path
  1.213     +14 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- ChangeLog	3 Jan 2006 08:23:37 -0000	1.212
  +++ ChangeLog	3 Jan 2006 10:06:35 -0000	1.213
  @@ -1,5 +1,19 @@
   2006-01-03  Anders Carlsson  <andersca at mac.com>
   
  +        Reviewed by Maciej.
  +
  +        - Add test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
  +        createDocument fails with DOM Exception 5 when passed empty qname
  +        
  +        * dom/html/level2/core/createDocument08-expected.txt:
  +        * dom/xhtml/level2/core/createDocument08-expected.txt:
  +        These now fail.
  +        
  +        * fast/dom/createDocument-empty-expected.txt: Added.
  +        * fast/dom/createDocument-empty.html: Added.
  +
  +2006-01-03  Anders Carlsson  <andersca at mac.com>
  +
           Reviewed by Darin.
   
           - Add tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=5177
  
  
  
  1.3       +3 -2      LayoutTests/dom/html/level2/core/createDocument08-expected.txt
  
  Index: createDocument08-expected.txt
  ===================================================================
  RCS file: /cvs/root/LayoutTests/dom/html/level2/core/createDocument08-expected.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- createDocument08-expected.txt	5 Sep 2005 22:41:37 -0000	1.2
  +++ createDocument08-expected.txt	3 Jan 2006 10:06:35 -0000	1.3
  @@ -1,2 +1,3 @@
  -Test:	http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08
  -Status:	Success
  +Test:	http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08	
  +Status:	failure
  +Detail:	throw_INVALID_CHARACTER_ERR: assertTrue failed
  
  
  
  1.2       +2 -1      LayoutTests/dom/xhtml/level2/core/createDocument08-expected.txt
  
  Index: createDocument08-expected.txt
  ===================================================================
  RCS file: /cvs/root/LayoutTests/dom/xhtml/level2/core/createDocument08-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- createDocument08-expected.txt	26 Sep 2005 22:41:14 -0000	1.1
  +++ createDocument08-expected.txt	3 Jan 2006 10:06:35 -0000	1.2
  @@ -1,3 +1,4 @@
   Test	http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08
  -Status	Success
  +Status	failure
  +Message	throw_INVALID_CHARACTER_ERR: assertTrue failed
   
  
  
  
  1.1                  LayoutTests/fast/dom/createDocument-empty-expected.txt
  
  Index: createDocument-empty-expected.txt
  ===================================================================
  This tests that it should be possible to create documents with empty/null qnames and namespaceURIs. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
  SUCCESS!
  
  
  
  
  1.1                  LayoutTests/fast/dom/createDocument-empty.html
  
  Index: createDocument-empty.html
  ===================================================================
  <html>
  <head>
  <script>
  function debug(str) {
      pre = document.getElementById('console');
      txt = document.createTextNode(str)
      pre.appendChild(txt)
  }
  function runTests() {
      if (window.layoutTestController)
          layoutTestController.dumpAsText();
  
      var uri = 'http://www.example.org';
  
      // Both null namespaceURI and qname
      try {
          var doc = document.implementation.createDocument(null, null, null)
          
          if (doc.documentElement) {
              debug('FAILURE: Document created should not have a document element')
              return;
          }
      } catch (e) {
          debug('FAILURE: Got exception ' + e.message + ' when creating document with null namespaceURI and qualifiedName')
          return;
      }
      
      // Both empty namespaceURI and qname
      try {
          var doc = document.implementation.createDocument('', '', null)
          
          if (doc.documentElement) {
              debug('FAILURE: Document created should not have a document element')
              return;
          }
      } catch (e) {
          debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI and qualifiedName')
          return;
      }
  
      // Null namespaceURI with qname
      try {
          var doc = document.implementation.createDocument(null, 'test', null)
          
          if (!doc.documentElement) {
              debug('FAILURE: Document created should have a document element')
              return;
          }
          
      } catch (e) {
          debug('FAILURE: Got exception ' + e.message + ' when creating document with null namespaceURI')
          return;
      }
      
      // Empty namespaceURI with qname
      try {
          var doc = document.implementation.createDocument('', 'test', null)
          
          if (!doc.documentElement) {
              debug('FAILURE: Document created should have a document element')
              return;
          }
          
      } catch (e) {
          debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI')
          return;
      }
  
      // namespaceURI with empty qname
      try {
          var doc = document.implementation.createDocument(uri, '', null)
          
          if (doc.documentElement) {
              debug('FAILURE: Document created should not have a document element')
              return;
          }
          
      } catch (e) {
          debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI')
          return;
      }
      
      debug('SUCCESS!')
  }
  
  </script>
  </head>
  <body onload="runTests();">
  This tests that it should be possible to create documents with empty/null qnames and namespaceURIs. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
  <pre id="console">
  </pre>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list