@GwtCompatible public final class HtmlConversions extends Object
These methods are useful when types are constructed in a manner where using the production API is too inconvenient. Please do use the production API whenever possible; there is value in having tests reflect common usage. Using the production API also avoids, by design, non-contract complying instances from being created.
Modifier and Type | Method and Description |
---|---|
static SafeHtml |
newSafeHtmlForTest(String string)
Creates a
SafeHtml wrapping the given string . |
static SafeHtmlProto |
newSafeHtmlProtoForTest(String string)
Creates a
SafeHtmlProto wrapping the given string . |
static SafeScript |
newSafeScriptForTest(String string)
Creates a
SafeScript wrapping the given string . |
static SafeScriptProto |
newSafeScriptProtoForTest(String string)
Creates a
SafeScriptProto wrapping the given string . |
static SafeStyle |
newSafeStyleForTest(String string)
Creates a
SafeStyle wrapping the given string . |
static SafeStyleProto |
newSafeStyleProtoForTest(String string)
Creates a
SafeStyleProto wrapping the given string . |
static SafeStyleSheet |
newSafeStyleSheetForTest(String string)
Creates a
SafeStyleSheet wrapping the given string . |
static SafeStyleSheetProto |
newSafeStyleSheetProtoForTest(String string)
Creates a
SafeStyleSheetProto wrapping the given string . |
static SafeUrl |
newSafeUrlForTest(String string)
Creates a
SafeUrl wrapping the given string . |
static SafeUrlProto |
newSafeUrlProtoForTest(String string)
Creates a
SafeUrlProto wrapping the given string . |
static TrustedResourceUrl |
newTrustedResourceUrlForTest(String string)
Creates a
TrustedResourceUrl wrapping the given string . |
static TrustedResourceUrlProto |
newTrustedResourceUrlProtoForTest(String string)
Creates a
TrustedResourceUrlProto wrapping the given string . |
public static SafeHtmlProto newSafeHtmlProtoForTest(String string)
SafeHtmlProto
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeHtmls
instead.
public static SafeScript newSafeScriptForTest(String string)
SafeScript
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeScripts
instead.
public static SafeScriptProto newSafeScriptProtoForTest(String string)
SafeScriptProto
wrapping the given string
. No validation is
performed.
If possible please use the production API in
SafeScripts
instead.
public static SafeStyle newSafeStyleForTest(String string)
SafeStyle
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeStyles
instead.
public static SafeStyleProto newSafeStyleProtoForTest(String string)
SafeStyleProto
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeStyles
instead.
public static SafeStyleSheet newSafeStyleSheetForTest(String string)
SafeStyleSheet
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeStyleSheets
instead.
public static SafeStyleSheetProto newSafeStyleSheetProtoForTest(String string)
SafeStyleSheetProto
wrapping the given string
. No validation is
performed.
If possible please use the production API in
SafeStyleSheets
instead.
public static SafeUrlProto newSafeUrlProtoForTest(String string)
SafeUrlProto
wrapping the given string
. No validation is performed.
If possible please use the production API in
SafeUrls
instead.
public static TrustedResourceUrl newTrustedResourceUrlForTest(String string)
TrustedResourceUrl
wrapping the given string
. No validation is
performed.
If possible please use the production API in
TrustedResourceUrls
instead.
public static TrustedResourceUrlProto newTrustedResourceUrlProtoForTest(String string)
TrustedResourceUrlProto
wrapping the given string
. No validation is
performed.
If possible please use the production API in
TrustedResourceUrls
instead.