goog.testing.dom
Functions
assertHtmlContentsMatch( htmlPattern, actual, opt_strictAttributes ) → void
void
Assert that the html in actual
is substantially similar to
htmlPattern. This method tests for the same set of styles, for the same
order of nodes, and the presence of attributes. Breaking whitespace nodes
are ignored. Elements can be
annotated with classnames corresponding to keys in goog.userAgent and will be
expected to show up in that user agent and expected not to show up in
others.
Parameters |
|
---|
assertHtmlMatches( htmlPattern, actual, opt_strictAttributes ) → void
void
Assert that the html in actual
is substantially similar to
htmlPattern. This method tests for the same set of styles, and for the same
order of nodes. Breaking whitespace nodes are ignored. Elements can be
annotated with classnames corresponding to keys in goog.userAgent and will be
expected to show up in that user agent and expected not to show up in
others.
Parameters |
|
---|
assertNodesMatch( it, array ) → void
void
Tests if the given iterator over nodes matches the given Array of node descriptors. Throws an error if any match fails.
Parameters |
|
---|
assertRangeEquals( start, startOffset, end, endOffset, range ) → void
void
Assert the end points of a range.
Notice that "Are two ranges visually identical?" and "Do two ranges have the same endpoint?" are independent questions. Two visually identical ranges may have different endpoints. And two ranges with the same endpoints may be visually different.
Parameters |
|
---|
exposeNode( node ) → string
string
Exposes a node as a string.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
exposeRange( range ) → string
string
Exposes the nodes of a range wrapper as a string.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
findTextNode( textOrRegexp, root ) → (Node|null)
(Node|null)
Finds the first text node descendant of root with the given content. Note that this operates on a text node level, so if text nodes get split this may not match the user visible text. Using normalize() may help here.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|