Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 17f201f64122d685b2c0803df77c9f490a725805 Sven Fuchs committed May 16, 2010
Showing 4,690 changed files with 341,324 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
0 README
No changes.
@@ -0,0 +1,83 @@
+
+###
+# This Ruby source file was generated by test-to-ruby.xsl
+# and is a derived work from the source document.
+# The source document contained the following notice:
+=begin
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+=end
+#
+
+require 'helper'
+
+###
+# Attr nodes may be associated with Element nodes contained within a DocumentFragment.
+# Create a new DocumentFragment and add a newly created Element node(with one attribute).
+# Once the element is added, its attribute should be available as an attribute associated
+# with an Element within a DocumentFragment.
+# @author NIST
+# @author Mary Brady
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-35CB04B5]
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082]
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3]
+##
+DOMTestCase('attrcreatedocumentfragment') do
+
+ ###
+ # Constructor.
+ # @param factory document factory, may not be null
+ # @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
+ ##
+ def setup
+ ##
+ ## check if loaded documents are supported for content type
+ ##
+ contentType = getContentType()
+ preload(contentType, "staff", true)
+ end
+
+ ###
+ # Runs the test case.
+ # @throws Throwable Any uncaught exception causes test to fail
+ #
+ def test_attrcreatedocumentfragment
+ doc = nil
+ docFragment = nil
+ newOne = nil
+ domesticNode = nil
+ domesticAttr = nil
+ attrs = nil
+ attrName = nil
+ appendedChild = nil
+ doc = load_document("staff", true)
+ docFragment = doc.createDocumentFragment()
+ newOne = doc.createElement("newElement")
+ newOne.setAttribute("newdomestic", "Yes")
+ appendedChild = docFragment.appendChild(newOne)
+ domesticNode = docFragment.firstChild()
+ domesticAttr = domesticNode.attributes()
+ attrs = domesticAttr.item(0)
+ attrName = attrs.name()
+ assert_equal("newdomestic", attrName, "attrCreateDocumentFragmentAssert")
+
+ end
+
+ ###
+ # Gets URI that identifies the test.
+ # @return uri identifier of test
+ #
+ def targetURI
+ "http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/attrcreatedocumentfragment"
+ end
+end
+
@@ -0,0 +1,84 @@
+
+###
+# This Ruby source file was generated by test-to-ruby.xsl
+# and is a derived work from the source document.
+# The source document contained the following notice:
+=begin
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+=end
+#
+
+require 'helper'
+
+###
+# The "setValue()" method for an attribute creates a
+# Text node with the unparsed content of the string.
+# Retrieve the attribute named "street" from the last
+# child of of the fourth employee and assign the "Y&ent1;"
+# string to its value attribute. This value is not yet
+# parsed and therefore should still be the same upon
+# retrieval. This test uses the "getNamedItem(name)" method
+# from the NamedNodeMap interface.
+# @author NIST
+# @author Mary Brady
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474]
+# see[http://lists.w3.org/Archives/Public/www-dom-ts/2002Apr/0057.html]
+##
+DOMTestCase('attrcreatetextnode') do
+
+ ###
+ # Constructor.
+ # @param factory document factory, may not be null
+ # @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
+ ##
+ def setup
+ ##
+ ## check if loaded documents are supported for content type
+ ##
+ contentType = getContentType()
+ preload(contentType, "staff", true)
+ end
+
+ ###
+ # Runs the test case.
+ # @throws Throwable Any uncaught exception causes test to fail
+ #
+ def test_attrcreatetextnode
+ doc = nil
+ addressList = nil
+ testNode = nil
+ attributes = nil
+ streetAttr = nil
+ value = nil
+ doc = load_document("staff", true)
+ addressList = doc.getElementsByTagName("address")
+ testNode = addressList.item(3)
+ attributes = testNode.attributes()
+ streetAttr = attributes.getNamedItem("street")
+ streetAttr.value = "Y&ent1;"
+ value = streetAttr.value()
+ assert_equal("Y&ent1;", value, "value")
+ value = streetAttr.nodeValue()
+ assert_equal("Y&ent1;", value, "nodeValue")
+
+ end
+
+ ###
+ # Gets URI that identifies the test.
+ # @return uri identifier of test
+ #
+ def targetURI
+ "http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/attrcreatetextnode"
+ end
+end
+
@@ -0,0 +1,83 @@
+
+###
+# This Ruby source file was generated by test-to-ruby.xsl
+# and is a derived work from the source document.
+# The source document contained the following notice:
+=begin
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+=end
+#
+
+require 'helper'
+
+###
+# The "setNodeValue()" method for an attribute creates a
+# Text node with the unparsed content of the string.
+# Retrieve the attribute named "street" from the last
+# child of of the fourth employee and assign the "Y&ent1;"
+# string to its value attribute. This value is not yet
+# parsed and therefore should still be the same upon
+# retrieval. This test uses the "getNamedItem(name)" method
+# from the NamedNodeMap interface.
+# @author Curt Arnold
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080]
+# see[http://lists.w3.org/Archives/Public/www-dom-ts/2002Apr/0057.html]
+##
+DOMTestCase('attrcreatetextnode2') do
+
+ ###
+ # Constructor.
+ # @param factory document factory, may not be null
+ # @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
+ ##
+ def setup
+ ##
+ ## check if loaded documents are supported for content type
+ ##
+ contentType = getContentType()
+ preload(contentType, "staff", true)
+ end
+
+ ###
+ # Runs the test case.
+ # @throws Throwable Any uncaught exception causes test to fail
+ #
+ def test_attrcreatetextnode2
+ doc = nil
+ addressList = nil
+ testNode = nil
+ attributes = nil
+ streetAttr = nil
+ value = nil
+ doc = load_document("staff", true)
+ addressList = doc.getElementsByTagName("address")
+ testNode = addressList.item(3)
+ attributes = testNode.attributes()
+ streetAttr = attributes.getNamedItem("street")
+ streetAttr.nodeValue = "Y&ent1;"
+ value = streetAttr.value()
+ assert_equal("Y&ent1;", value, "value")
+ value = streetAttr.nodeValue()
+ assert_equal("Y&ent1;", value, "nodeValue")
+
+ end
+
+ ###
+ # Gets URI that identifies the test.
+ # @return uri identifier of test
+ #
+ def targetURI
+ "http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/attrcreatetextnode2"
+ end
+end
+
@@ -0,0 +1,93 @@
+
+###
+# This Ruby source file was generated by test-to-ruby.xsl
+# and is a derived work from the source document.
+# The source document contained the following notice:
+=begin
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+=end
+#
+
+require 'helper'
+
+###
+# If there is not an explicit value assigned to an attribute
+# and there is a declaration for this attribute and that
+# declaration includes a default value, then that default
+# value is the attributes default value.
+# Retrieve the attribute named "street" from the last
+# child of of the first employee and examine its
+# value. That value should be the value given the
+# attribute in the DTD file. The test uses the
+# "getNamedItem(name)" method from the NamedNodeMap
+# interface.
+# @author NIST
+# @author Mary Brady
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096]
+# see[http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549]
+# see[http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html]
+##
+DOMTestCase('attrdefaultvalue') do
+
+ ###
+ # Constructor.
+ # @param factory document factory, may not be null
+ # @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
+ ##
+ def setup
+=begin
+ org.w3c.domts.DocumentBuilderSetting[] settings =
+ new org.w3c.domts.DocumentBuilderSetting[] {
+org.w3c.domts.DocumentBuilderSetting.validating
+ };
+ DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings)
+ setFactory(testFactory)
+=end
+
+ ##
+ ## check if loaded documents are supported for content type
+ ##
+ contentType = getContentType()
+ preload(contentType, "staff", false)
+ end
+
+ ###
+ # Runs the test case.
+ # @throws Throwable Any uncaught exception causes test to fail
+ #
+ def test_attrdefaultvalue
+ doc = nil
+ addressList = nil
+ testNode = nil
+ attributes = nil
+ streetAttr = nil
+ value = nil
+ doc = load_document("staff", false)
+ addressList = doc.getElementsByTagName("address")
+ testNode = addressList.item(0)
+ attributes = testNode.attributes()
+ streetAttr = attributes.getNamedItem("street")
+ value = streetAttr.nodeValue()
+ assert_equal("Yes", value, "attrDefaultValueAssert")
+
+ end
+
+ ###
+ # Gets URI that identifies the test.
+ # @return uri identifier of test
+ #
+ def targetURI
+ "http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/attrdefaultvalue"
+ end
+end
+
Oops, something went wrong.

0 comments on commit 17f201f

Please sign in to comment.