goog.html.testing
Functions
checkTypedStringEquality( actual, expected ) → (boolean|undefined)
(boolean|undefined)
Equality tester to be used in Jasmine tests. Example:
beforeEach(function() {
jasmine.addCustomEqualityTester(
goog.html.testing.checkTypedStringEquality);
});
it('typed string value matches same string', function() {
expect(f).toHaveBeenCalledWith('expected');
});
it('typed string value matches same type and string', function() {
expect(f).toHaveBeenCalledWith(goog.string.Const.from('expected'));
});
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
matchSafeHtml( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for SafeHtml.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
matchSafeScript( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for SafeScript.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
matchSafeStyle( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for SafeStyle.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
matchSafeStyleSheet( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for SafeStyleSheet.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
matchSafeUrl( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for SafeUrl.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
matchTrustedResourceUrl( expected ) → goog.testing.mockmatchers.ArgumentMatcher
goog.testing.mockmatchers.ArgumentMatcher
Creates an argument matcher for TrustedResourceUrl.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newSafeHtmlForTest( html ) → goog.html.SafeHtml
goog.html.SafeHtml
Creates a SafeHtml wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newSafeScriptForTest( script ) → goog.html.SafeScript
goog.html.SafeScript
Creates a SafeScript wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newSafeStyleForTest( style ) → goog.html.SafeStyle
goog.html.SafeStyle
Creates a SafeStyle wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newSafeStyleSheetForTest( styleSheet ) → goog.html.SafeStyleSheet
goog.html.SafeStyleSheet
Creates a SafeStyleSheet wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newSafeUrlForTest( url ) → goog.html.SafeUrl
goog.html.SafeUrl
Creates a SafeUrl wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
newTrustedResourceUrlForTest( url ) → goog.html.TrustedResourceUrl
goog.html.TrustedResourceUrl
Creates a TrustedResourceUrl wrapping the given value. No validation is performed.
This function is for use in tests only and must never be used in production code.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|