abstractdialogplugin_test.js
No description.

File Location

/goog/editor/plugins/abstractdialogplugin_test.js


Public Protected Private

Global Functions

createDialog(dialogDomHelper) goog.ui.editor.AbstractDialog
Creates a concrete instance of goog.ui.editor.AbstractDialog by adding a plain implementation of createDialogControl().
Arguments:
dialogDomHelper : goog.dom.DomHelper
The dom helper to be used to create the dialog.
Returns: goog.ui.editor.AbstractDialog  The created dialog.
code »
createDialogPlugin() goog.editor.plugins.AbstractDialogPlugin
Creates a concrete instance of the abstract class goog.editor.plugins.AbstractDialogPlugin and registers it with the mock editable field being used.
Returns: goog.editor.plugins.AbstractDialogPlugin  The created plugin.
code »
expectClosed()
Sets up the mock event handler to expect a CLOSED event.
code »
expectOpened()
Sets up the mock event handler to expect an OPENED event.
code »
setUp()
No description.
code »
setUpMockRange()
No description.
code »
setUpRealEditableField()
Setup a real editable field (instead of a mock) and register the plugin to it.
code »
tearDown()
No description.
code »
tearDownRealEditableField()
Tear down the real editable field.
code »
testDebounceSelectionChange()
Tests that after the dialog is hidden via a keystroke, the editable field doesn't fire an extra SELECTIONCHANGE event due to the keyup from that keystroke. There is also a robot test in dialog_robot.html to test debouncing the SELECTIONCHANGE event when the dialog closes.
code »
testExecAndDispose(opt_reuse)
Tests the simple flow of calling execCommand (which opens the dialog) and immediately disposing of the plugin (which closes the dialog).
Arguments:
opt_reuse : boolean=
Whether to set the plugin to reuse its dialog.
code »
testExecAndDisposeReuse()
Tests execCommand and dispose while reusing the dialog.
code »
testExecAndHide(reuse)
Tests the flow of calling execCommand (which opens the dialog) and then hiding it (simulating that a user did somthing to cause the dialog to close).
Arguments:
reuse : boolean
Whether to set the plugin to reuse its dialog.
code »
testExecAndHideReuse()
Tests execCommand and hide while reusing the dialog.
code »
testExecTwice(reuse)
Tests the flow of calling execCommand (which opens a dialog) and then calling it again before the first dialog is closed. This is not something anyone should be doing since dialogs are (usually?) modal so the user can't do another execCommand before closing the first dialog. But since the API makes it possible, I thought it would be good to guard against and unit test.
Arguments:
reuse : boolean
Whether to set the plugin to reuse its dialog.
code »
testExecTwiceReuse()
Tests execCommand twice while reusing the dialog.
code »
testRestoreSelection()
Tests that the selection is cleared when the dialog opens and is correctly restored after it closes.
code »

Global Variables

mockClosedHandler : goog.testing.LooseMock
No description.
Code »
mockHandler :
No description.
Code »
mockOpenedHandler : goog.testing.LooseMock
No description.
Code »
mockSavedRange :
No description.
Code »

Directory plugins

File Reference