Package org.waveprotocol.wave.client.editor.testtools

Examples of org.waveprotocol.wave.client.editor.testtools.ContentWithSelection


  protected void assertEditorContent(String msg,
      String expectedContentWithSelection, Editor actualEditor)
      throws OperationException {

    // Parse the expected content
    ContentWithSelection expected =
        parseContent(expectedContentWithSelection);

    // Assert result
    assertEditorContent(
        msg, expected, actualEditor);
View Full Code Here


   * @return parsed content + selection
   * @throws OperationException
   */
  protected ContentWithSelection parseContent(String content)
      throws OperationException {
    return new ContentWithSelection(abbreviations.expand(content));
  }
View Full Code Here

   */
  protected void setContent(Editor editor, String content)
      throws OperationException {

    // Parse content
    ContentWithSelection parsed = parseContent(content);

    // Set content + selection in editor
    editor.setContent(DocProviders.POJO.parse(parsed.content).asOperation(),
        TEST_SCHEMA);
    editor.getSelectionHelper().setSelectionRange(parsed.selection == null ? null
View Full Code Here

    private TestBundle(String initialContent) {
      local = createEditor();
      RootPanel.get().add(local);

      ContentWithSelection content = new ContentWithSelection(initialContent);
      ContentSerialisationUtil.setContentString(local, content.content);
      local.getAggressiveSelectionHelper().setSelectionRange(
          new FocusedRange(content.selection, true));

      remote = createEditor();
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.editor.testtools.ContentWithSelection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.