field_test.js
No description.

File Location

/goog/editor/field_test.js

Classes

TestPlugin
Dummy plugin for test usage.

Public Protected Private

Global Functions

doTestPlaceCursorAtEnd(opt_htmlopt_parentIdopt_offset)
Helper to test that the cursor is placed at the beginning of the editable field's contents.
Arguments:
opt_html : string=
Html to replace the test file default field contents with.
opt_parentId : string=
Id of the parent of the node where the cursor is expected to be placed. If omitted, will expect cursor to be placed in the first child of the field element (or, if the field has no content, in the field element itself).
opt_offset : number=
The offset to expect for the end position.
code »
doTestPlaceCursorAtStart(opt_htmlopt_parentId)
Helper to test that the cursor is placed at the beginning of the editable field's contents.
Arguments:
opt_html : string=
Html to replace the test file default field contents with.
opt_parentId : string=
Id of the parent of the node where the cursor is expected to be placed. If omitted, will expect cursor to be placed in the first child of the field element (or, if the field has no content, in the field element itself).
code »
getBrowserEvent() goog.events.Event
No description.
Returns: goog.events.Event  Returns an event for a keyboard shortcut for the letter 'a'.
code »
setUp()
No description.
code »
tearDown()
No description.
code »
testClearDelayedChange()
No description.
code »
testDispatchDelayedChange()
No description.
code »
testDisposed_PluginAutoDispose()
Tests that plugins get auto disposed by default when the field is disposed. Tests that plugins with setAutoDispose(false) do not get disposed when the field is disposed.
code »
testGetEditableDomHelper()
No description.
code »
testGetPluginByClassId()
Tests that registered plugins can be fetched by their id.
code »
testHandleChange()
No description.
code »
testHandleCutAndPasteEvents()
Tests to make sure the cut and paste events are not dispatched immediately.
code »
testHandleWindowLevelMouseUp()
No description.
code »
testHandledKeyEvent()
If one plugin handles a key event, the rest of the plugins do not get their key handlers invoked.
code »
testHandledSelectionChange()
Tests that if a plugin handles selectionChange that it gets called and no further plugins can handle the selectionChange.
code »
testIsGeneratingKey()
No description.
code »
testKeyHandlingAlt()
Make sure that handleKeyboardShortcut is not called if alt is pressed.
code »
testKeyboardShortcutCalled()
Make sure that handleKeyboardShortcut is called if other key handlers return false.
code »
testKeyboardShortcutNotCalled()
Make sure that handleKeyboardShortcut is not called if other key handlers return true.
code »
testMakeUneditableDisablesPlugins()
Tests that plugins are disabled when the field is made uneditable.
code »
testNoHandleWindowLevelMouseUp()
No description.
code »
testNotHandledKeyEvent()
If the first plugin does not handle the key event, the next plugin gets a chance to handle it.
code »
testNotHandledSelectionChange()
Tests that if the first plugin does not handle selectionChange that the next plugin gets a chance to handle it.
code »
testNotSupportedExecCommand()
Test that if the first plugin does not support execCommand, the other plugins get a chance to handle the execCommand.
code »
testNotSupportedQueryCommand()
Tests that if the first plugin does not support a command that its queryCommandValue do not get called and the next plugin can handle the queryCommandValue.
code »
testPlaceCursorAtEnd()
No description.
code »
testPlaceCursorAtEndEmptyField()
No description.
code »
testPlaceCursorAtEndNonImportantTextNode()
No description.
code »
testPlaceCursorAtStart()
No description.
code »
testPlaceCursorAtStartEmptyField()
No description.
code »
testPlaceCursorAtStartNonImportantTextNode()
No description.
code »
testPluginExecCommand()
Test that if a plugin has an execCommand function, it gets called but only for supported commands.
code »
testPluginKeyDown()
Test that if a plugin registers keydown, it gets called.
code »
testPluginKeyPress()
Test that if a plugin registers keypress, it gets called.
code »
testPluginKeyUp()
Test that if a plugin registers keyup, it gets called.
code »
testQueryCommandValue()
No description.
code »
testRegisterPlugin()
Tests that calling registerPlugin will add the plugin to the plugin map.
code »
testRestoreSavedRange()
Verify that restoreSavedRange() restores the range and sets the focus.
code »
testSelectionChange()
No description.
code »
testSelectionChangeBeforeUneditable()
No description.
code »
testSelectionChangeOnMouseUp()
No description.
code »
testSetHtml()
No description.
code »
testSupportedExecCommand()
Test that if one plugin supports execCommand, no other plugins get a chance to handle the execComand.
code »
testSupportedQueryCommand()
Tests that if a plugin supports a command that its queryCommandValue gets called and no further plugins can handle the queryCommandValue.
code »
testUnregisterPlugin()
Tests that calling unregisterPlugin will remove the plugin from the map.
code »

Global Variables

FieldConstructor :
Constructor to use for creating the field. Set by the test HTML file.
Code »
STRING_KEY :
No description.
Code »

Directory editor

File Reference