basictextformatter_test.js
No description.

File Location

/goog/editor/plugins/basictextformatter_test.js


Public Protected Private

Global Functions

MOCK_GET_BLOCKQUOTE_STYLES()
No description.
code »
assertFontSizes(msgsizeChangesMap)
Asserts that the text nodes set up by setUpFontSizeTests() have had their font sizes changed as described by sizeChangesMap.
Arguments:
msg : string
Assertion error message.
sizeChangesMap : Object.<string, number | null>
Maps the text content of a text node to be measured to its expected font size in pixels, or null if that text node should not be present in the document (i.e. because it was split into two). Only the text nodes that have changed from their default need to be specified.
code »
assertNotBadBrElements()
Assert that only BR elements expected to persist after convertBreaksToDivs_ are in the HTML.
code »
assertNotPreparedContents()
Assert that sanitization doesn't affect the given text.
code »
assertPreparedContents()
Assert that the prepared contents matches the expected.
code »
doTestFontSizeStyledSpan(doSelect)
Helper to make sure the precondition that executing the font size command wraps the content in font tags instead of modifying the style attribute is maintained by the browser even if the selection is already text that is wrapped in a tag with a font size style. We test this with several permutations of how the selection looks: selecting the text in the text node, selecting the whole text node as a unit, or selecting the whole span node as a unit. Sometimes the browser wraps the text node with the font tag, sometimes it wraps the span with the font tag. Either one is ok as long as a font tag is actually being used instead of just modifying the span's style, because our fix for would remove that style.
Arguments:
doSelect : function
Function to select the "23" text in the test content.
code »
doTestIsJustification()
No description.
code »
doTestIsJustificationPInDiv()
No description.
code »
selectRealField()
No description.
code »
setUp()
No description.
code »
setUpConvertBreaksToDivTests()
No description.
code »
setUpFontSizeTests()
No description.
code »
setUpIframeField()
No description.
code »
setUpJustifyTests()
No description.
code »
setUpLinkTests()
No description.
code »
setUpListAndBlockquoteTests()
No description.
code »
setUpPage()
No description.
code »
setUpRealField()
No description.
code »
setUpRealFieldIframe()
No description.
code »
setUpSubSuperTests()
No description.
code »
tearDown()
No description.
code »
tearDownConvertBreaksToDivTests()
No description.
code »
tearDownFontSizeTests()
No description.
code »
tearDownHelper()
No description.
code »
tearDownIframeField()
No description.
code »
tearDownJustifyTests()
No description.
code »
tearDownLinkTests()
No description.
code »
tearDownListAndBlockquoteTests()
No description.
code »
tearDownSubSuperTests()
No description.
code »
testCanceledLink()
No description.
code »
testConvertBreaksToDivsDoesntCollapseBR()
No description.
code »
testConvertBreaksToDivsInsertList()
No description.
code »
testConvertBreaksToDivsKeepsId()
Regression test for , where if a br has an id, it causes the convert br code to throw a js error. This goes a step further and ensures that the id is preserved in the resulting div element.
code »
testConvertBreaksToDivsKeepsP()
No description.
code »
testConvertBreaksToDivsSelection()
No description.
code »
testFontSizeDoesntOverrideStyleAttr()
Makes sure the font size style is not removed when only a part of the element with font size style is selected during the font size command.
code »
testFontSizeDoesntOverrideStyleAttrMultiNode()
Makes sure the font size style is not removed when only a part of the element with font size style is selected during the font size command, but is removed for another element that is fully selected.
code »
testFontSizeOverridesStyleAttr()
Regression test for . Tests that when you change the font size of a selection, any font size styles that were nested inside are removed.
code »
testFontSizeOverridesStyleAttrMultiNode()
Make sure the style stripping works when the selection starts and stops in different nodes that both contain font size styles.
code »
testFontSizeStyledSpanSelectingSpanNode()
No description.
code »
testFontSizeStyledSpanSelectingText()
No description.
code »
testFontSizeStyledSpanSelectingTextNode()
No description.
code »
testGeckoListFont()
No description.
code »
testGeckoSelectionChange()
No description.
code »
testIEExecCommandFixes()
No description.
code »
testIEList()
No description.
code »
testIsJustificationCenter()
No description.
code »
testIsJustificationComplete1()
No description.
code »
testIsJustificationComplete2()
No description.
code »
testIsJustificationComplete3()
No description.
code »
testIsJustificationComplete4()
No description.
code »
testIsJustificationComplete5()
No description.
code »
testIsJustificationEmptySelection()
Regression test for , where all 3 justification buttons are considered "on" when you first tab into the editable field. In this situation, when lorem ipsum is the only node in the editable field iframe body, mockField.getRange() returns an empty range.
code »
testIsJustificationFull()
No description.
code »
testIsJustificationLeft()
No description.
code »
testIsJustificationPInDivCenter()
No description.
code »
testIsJustificationPInDivCenterCss()
No description.
code »
testIsJustificationPInDivJustify()
No description.
code »
testIsJustificationPInDivJustifyCss()
No description.
code »
testIsJustificationPInDivLeft()
No description.
code »
testIsJustificationPInDivLeftCss()
No description.
code »
testIsJustificationPInDivRight()
No description.
code »
testIsJustificationPInDivRightCss()
No description.
code »
testIsJustificationRight()
No description.
code »
testIsJustificationSimple1()
No description.
code »
testIsJustificationSimple2()
No description.
code »
testJustify()
No description.
code »
testJustifyInBlock()
No description.
code »
testJustifyInInline()
No description.
code »
testLink()
No description.
code »
testPrepareContent()
No description.
code »
testScrubImagesRemovesCustomAttributes()
No description.
code »
testSelectedLink()
No description.
code »
testSubscriptRemovesSuperscript()
No description.
code »
testSubscriptRemovesSuperscriptIntersecting()
No description.
code »
testSuperscriptRemovesSubscript()
No description.
code »
testSuperscriptRemovesSubscriptIntersecting()
No description.
code »
testSwitchListType()
No description.
code »
testUnfocusedLink()
No description.
code »
testWebKitList()
No description.
code »

Global Variables

CLOSE_SUB :
No description.
Code »
CLOSE_SUPER :
No description.
Code »
No description.
Code »
JUSTIFICATION_COMMANDS :
No description.
Code »
MOCK_BLOCKQUOTE_STYLE :
No description.
Code »
OPEN_SUB :
No description.
Code »
OPEN_SUPER :
No description.
Code »
REAL_FIELD : goog.editor.Field
No description.
Code »
No description.
Code »
ROOT :
No description.
Code »
defaultFontSizeMap :
No description.
Code »
isFontSizeTest :
No description.
Code »

Directory plugins

File Reference