dom-core-test.js revision 3489fc6bb1b5c6100aead509cd90048e4bb61617
1080N/A 'should return element from string':
function() {
1080N/A 'should return first match when dupe id exists':
function() {
1080N/A 'should return null when no match':
function() {
1080N/A 'should return null when input is null':
function() {
1080N/A 'should return null when input is undefined':
function() {
1080N/A 'should avoid mistaking name for id':
function() {
1080N/A 'should avoid mistaking form id for named input':
function() {
1080N/A 'should search the given node':
function() {
1080N/A 'should restrict search to the given node':
function() {
1080N/A 'should search the given node (off document)':
function() {
1080N/A 'should search the given document (frame)':
function() {
1080N/A 'should search the given document (frame)':
function() {
1080N/A 'should return all elements with the given id':
function() {
1080N/A 'should return all elements with the given id (root element)':
function() {
1080N/A 'should return empty array when no match':
function() {
230N/A 'should return empty array when no element childNodes':
function() {
230N/A 'should return empty array when input is null':
function() {
1080N/A 'should return empty array when input is undefined':
function() {
230N/A 'should return elements only':
function() {
1080N/A 'should return the first match':
function() {
1080N/A 'should return the first match (root element)':
function() {
1080N/A 'should return null when no match':
function() {
1080N/A 'should return null when tag is null':
function() {
1080N/A 'should search given document':
function() {
1080N/A 'should search given document (frame)':
function() {
1080N/A 'should return the text content of the given node':
function() {
1080N/A 'should return the text content of the given text node':
function() {
1080N/A 'should return empty string when no text found' :
function() {
1080N/A 'should return empty string when input is null' :
function() {
'should return empty string when input is undefined' :
function() {
'should set content with the given text':
function() {
'should set html content as text':
function() {
content =
'<div>testing text content</div>';
'should preserve spaces':
function() {
content =
' testing text content ';
'should replace existing content':
function() {
'should set text for text node':
function() {
name:
'Y.DOM.elementByAxis',
'should return the next element':
function() {
'should return the next node':
function() {
'should return the next element that passes the test fn':
function() {
'should return the next node that passes the test fn':
function() {
'should return the previous element':
function() {
'should return the previous node':
function() {
'should return the previous element that passes the test fn':
function() {
'should return the previous node that passes the test fn':
function() {
'should return the parent element':
function() {
'should return the ancestor element that passes the test fn':
function() {
'should return null when not found':
function() {
'should return null when input is null':
function() {
'should return null when input is undefined':
function() {
'should return the parent node':
function() {
'should return the same node':
function() {
'should return the matching ancestor':
function() {
'should return the matching ancestor (test self match)':
function() {
'should return the matching ancestor (test self not matched)':
function() {
'should return an array of one (documentElement)':
function() {
'should include the starting node':
function() {
'should omit the starting node':
function() {
'should return the matching ancestors':
function() {
'should return the matching ancestors (test self match)':
function() {
'should return the matching ancestors (test self not matched)':
function() {
'html element should contain body element':
function() {
'body element should not contain html element':
function() {
'should be true for contained element':
function() {
'should be false for uncontained element':
function() {
'should be true when element is element':
function() {
'should be true for contained text node':
function() {
'should be false for uncontained text node':
function() {
'should return false for null input':
function() {
'should return false for undefined input':
function() {
name:
'Y.DOM._bruteContains',
'html element should contain body element':
function() {
'body element should not contain html element':
function() {
'should be true for contained element':
function() {
'should be false for uncontained element':
function() {
'should be true when element is element':
function() {
'should be true for contained text node':
function() {
'should be false for uncontained text node':
function() {
'should return false for null input':
function() {
'should return false for undefined input':
function() {
'should return false for off document node':
function() {
'should return true for in document node':
function() {
'should return false for removed node':
function() {
'should work with duplicate IDs in document':
function() {
'should work with duplicate IDs off document':
function() {
'should work with form that has input name="id" and id="id"':
function() {
'should return false when input is null':
function() {
'should return false for cloned node off document':
function() {
'should return true for cloned node in document (same id)':
function() {
'should return true for cloned node in document (new id)':
function() {
'should create empty div':
function() {
'should trim leading space':
function() {
'should create empty div (self-closed input)':
function() {
'should create div with text':
function() {
'should create div with innerHTML':
function() {
'should create input type submit':
function() {
var el = Y.
DOM.
create(
'<input name="foo" value="bar" type="submit">');
'should create input type radio':
function() {
var el = Y.
DOM.
create(
'<input name="test-input" type="radio">');
'should create form':
function() {
'should create a form with content':
function() {
var el = Y.
DOM.
create(
'<form><fieldset><legend>foo</legend>' +
'<label>foo:</label><input name="foo"><input type="submit"></form>'),
'should create legend':
function() {
'should create fieldset':
function() {
'should create label':
function() {
'should create a list item':
function() {
'should create a one item list':
function() {
'should create a table':
function() {
'should create a table with content':
function() {
var el = Y.
DOM.
create(
'<table><tr><td>foo</td><td>bar</td></tr></table>'),
'should create a table head':
function() {
'should create a table head with nested table':
function() {
var el = Y.
DOM.
create(
'<thead><tr><td><table><tbody><tr>' +
'<td>fresh</td></tr></tbody></table></td></tr></thead>');
'should create a table heading cell':
function() {
'should create a caption':
function() {
'should create a colgroup':
function() {
'should create a col element':
function() {
'should create a colgroup with col elements':
function() {
var el = Y.
DOM.
create(
'<colgroup><col><col></colgroup>'),
// IE inserts a linefeed between cols 'should create a table row':
function() {
'should create a table row with content':
function() {
var el = Y.
DOM.
create(
'<tr><td>foo</td><td>bar</td></tr>');
'should create a table cell':
function() {
'should create a table cell with content':
function() {
'should create a button element':
function() {
'should create an optgroup element':
function() {
'should create an optgroup with an option':
function() {
var el = Y.
DOM.
create(
'<optgroup><option>foo</option></optgroup>');
'should create an optgroup with options':
function() {
var el = Y.
DOM.
create(
'<optgroup><option>foo</option><option>bar</option></optgroup>');
'should create a select element':
function() {
'should create a select with an option':
function() {
var el = Y.
DOM.
create(
'<select><option>foo</option></select>');
'should create a select with options':
function() {
var el = Y.
DOM.
create(
'<select><option>foo</option><option>bar</option></select>');
'should create a option element':
function() {
'should create a option with content':
function() {
'should create a selected option':
function() {
var el = Y.
DOM.
create(
'<option selected><foo</option>');
'should create an iframe (self-closed)':
function() {
'should create an iframe':
function() {
'should create an iframe with attributes':
function() {
var html =
'<iframe border="0" frameBorder="0" marginWidth="0"' +
' marginHeight="0" leftMargin="0" topMargin="0"' +
' allowTransparency="true" width="100%" height="99%"></iframe>';
'should create a script':
function() {
'should create a script with src':
function() {
'should create a link element':
function() {
'should create a link element with attrs':
function() {
'should create a textNode':
function() {
'should return a fragment when creating a collection':
function() {
var html =
'<div>foo</div><div id="tmp-bar">bar</div><div>baz</div>',
'should return a fragment containing options':
function() {
var html =
'<option>foo</option><option id="tmp-bar">bar</option><option>baz</option>',
'should return a fragment including text nodes':
function() {
var html =
'foo <span>bar</span> baz',
'should return a fragment with the correct selected option':
function() {
var html =
'<option>foo</option><option selected>bar</option><option>baz</option>';
'should return a fragment containing table cells':
function() {
var html =
'<td>foo</td><td id="tmp-bar">bar</td><td>baz</td>',
'should return a fragment containing col elements':
function() {
'should return a fragment containing table bodies':
function() {
var html =
'<tbody>foo</tbody><tbody id="tmp-bar">bar</tbody><tbody>baz</tbody>',
'should return a fragment containing thead with nested table and tbody':
function() {
var html =
'<thead><tr><td><table><tbody><tr><td>fresh</td></tr>' +
'</tbody></table></td></tr></thead><tbody></tbody>',
name:
'Y.DOM.getAttribute',
'should return "className" value':
function() {
'should return "for" value':
function() {
'should handle bad input':
function() {
name:
'Y.DOM.setAttribute',
'should set className':
function() {
'should set "for" attribute':
function() {
'should handle bad input':
function() {
'input value should match html value':
function() {
'input value should match no html value':
function() {
'input value should match empty html value':
function() {
'textarea value should match html value':
function() {
'textarea value should match no html value':
function() {
'should ignore textarea html value attribute':
function() {
'select value should match html value':
function() {
'select value should match no html value':
function() {
'select value should match empty html value with text':
function() {
'select value should match empty html value':
function() {
'option value should match html value':
function() {
'option value should match html content':
function() {
'option value should match no html value':
function() {
'option value should match empty html value with text':
function() {
'option value should match empty html value':
function() {
'button value should match html value':
function() {
'button value should match no html value':
function() {
'button value should ignore html content':
function() {
'button value should match empty value':
function() {
'input value should match updated value':
function() {
'value updated from empty string should be new value':
function() {
'value updated from no value should be new value':
function() {
'textarea from html value should match new value':
function() {
val =
'new textarea test';
'textarea from no value should match new value':
function() {
val =
'new textarea test';
'button value should match updated value':
function() {
'button value updated from empty string should be new value':
function() {
'button value updated from no value should be new value':
function() {
'option value should match updated value':
function() {
'option value updated from text should be new value':
function() {
'option value updated from empty string should be new value':
function() {
'option value updated from no value should be new value':
function() {
'should return fragment from HTMLCollection':
function() {
'should return fragment from Array of HTML Elements':
function() {
'should return null for bad input':
function() {
'should return true for window object':
function() {
'should return true for frame window object':
function() {
'should return false for document object':
function() {
'should return false for non-window input':
function() {
name:
'Y.DOM._removeChildNodes',
'should remove all childNodes':
function() {
html =
'<em>foo</em><strong>bar</strong><span>baz</span>';
'should append the given html to the node':
function() {
'should prepend the given html to the node':
function() {
'should insert the given html after the first child':
function() {
'should append the given node':
function() {
'should add html before the given node':
function() {
'should add html after the given node':
function() {
name:
'Y.DOM._getRegExp',
'should return RegExp obj':
function() {
'should return cached RegExp obj':
function() {
'should return new RegExp obj':
function() {
'should return document from body':
function() {
'should return document from new node':
function() {
'should return document from window':
function() {
'should return document from document':
function() {
'should return iframe document from iframe window':
function() {
'should return iframe document from iframe node':
function() {
'should return iframe document from iframe document':
function() {
'should return window from body':
function() {
'should return window from new node':
function() {
'should return window from window':
function() {
'should return window from document':
function() {
'should return iframe window from iframe window':
function() {
'should return iframe window from iframe node':
function() {
'should return iframe window from iframe document':
function() {
'should append html on all nodes in HTMLCollection':
function() {
'should setText on all nodes in HTMLCollection':
function() {
node.
innerHTML =
'<span>foo</span><span>bar</span><span>baz</span>',
'should set the node offsetWidth to the given value':
function() {
'should set the node offsetHeight to the given value':
function() {
'should set the node offsetWidth to zero if given a negative number':
function() {
'should set the node offsetHeight to zero if given a negative number':
function() {
'should set the offsetWidth via setWidth':
function() {
'should set the offsetHeight via setHeight':
function() {
'should set offsetWidth accounting for padding':
function() {
'should set offsetHeight accounting for padding':
function() {
'should set offsetWidth to padding when setting to zero':
function() {
'should set offsetHeight to padding when setting to zero':
function() {
'should wrap the node with the given html':
function() {
'should wrap the node with the given complex html':
function() {
Y.
DOM.
wrap(
node,
'<p><em><strong><span></span></strong></em></p>');
'should remove the node\'s parent':
function() {
'should remove the node\'s parent and replace in DOM':
function() {
'should remove the node\'s parent and replace in DOM with siblings':
function() {
parent.
innerHTML =
'<p><span>foo</span><em>bar</em><strong>baz</strong></p>';
},
'@VERSION@' ,{
requires:[
'dom-base',
'dom-deprecated',
'test']});