Package com.google.gwt.dev.shell.BrowserChannel

Examples of com.google.gwt.dev.shell.BrowserChannel.MessageType


  public void testProtocolVersionMessage() throws IOException,
      BrowserChannelException {
    int protoVersion = 42;
    new ProtocolVersionMessage(channel, protoVersion).send();
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.PROTOCOL_VERSION, type);
    ProtocolVersionMessage message = ProtocolVersionMessage.receive(channel);
    assertEquals(protoVersion, message.getProtocolVersion());
  }
View Full Code Here


  }

  public void testQuitMessage() throws IOException,
      BrowserChannelException {
    new QuitMessage(channel).send();
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.QUIT, type);
    QuitMessage.receive(channel);
  }
View Full Code Here

  }

  public void testRequestIconMessage() throws IOException,
      BrowserChannelException {
    RequestIconMessage.send(channel);
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.REQUEST_ICON, type);
    RequestIconMessage message = RequestIconMessage.receive(channel);
    assertFalse(message.isAsynchronous());
  }
View Full Code Here

  public void testReturnMessage() throws IOException,
      BrowserChannelException {
    Value val = new Value();
    val.setInt(42);
    new ReturnMessage(channel, false, val).send();
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.RETURN, type);
    ReturnMessage message = ReturnMessage.receive(channel);
    assertFalse(message.isException());
    Value valRecv = message.getReturnValue();
    assertEquals(ValueType.INT, valRecv.getType());
View Full Code Here

  public void testSwitchTransportMessage() throws IOException,
      BrowserChannelException {
    String transport = "shm";
    String transportArgs = "17021";
    new SwitchTransportMessage(channel, transport, transportArgs).send();
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.SWITCH_TRANSPORT, type);
    SwitchTransportMessage message = SwitchTransportMessage.receive(channel);
    assertEquals(transport, message.getTransport());
    assertEquals(transportArgs, message.getTransportArgs());
  }
View Full Code Here

  }

  public void testUserAgentIconMessage() throws IOException,
      BrowserChannelException {
    UserAgentIconMessage.send(channel, null);
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.USER_AGENT_ICON, type);
    UserAgentIconMessage message = UserAgentIconMessage.receive(channel);
    assertFalse(message.isAsynchronous());
    assertNull(message.getIconBytes());
View Full Code Here

        new FailErrorLogger(), clientToServer.getInputStream(),
        serverToClient.getOutputStream(), handler);
    TestBrowserChannel client = new TestBrowserChannel(
        serverToClient.getInputStream(), clientToServer.getOutputStream());
    new OldLoadModuleMessage(client, 1, "testModule", "userAgent").send();
    MessageType type = client.readMessageType();
    assertEquals("testModule", handler.getModuleName());
    assertEquals("userAgent", handler.getUserAgent());
    assertNull(handler.getUrl());
    assertNull(handler.getTabKey());
    assertNull(handler.getSessionKey());
View Full Code Here

        serverToClient.getOutputStream(), handler);
    TestBrowserChannel client = new TestBrowserChannel(
        serverToClient.getInputStream(), clientToServer.getOutputStream());
    new CheckVersionsMessage(client, 2, 2,
        HostedHtmlVersion.EXPECTED_GWT_ONLOAD_VERSION).send();
    MessageType type = client.readMessageType();
    assertEquals(MessageType.PROTOCOL_VERSION, type);
    ProtocolVersionMessage protocolMessage = ProtocolVersionMessage.receive(
        client);
    assertEquals(2, protocolMessage.getProtocolVersion());
    new LoadModuleMessage(client, "url", "tabkey", "session", "testModule",
View Full Code Here

        serverToClient.getOutputStream(), handler);
    TestBrowserChannel client = new TestBrowserChannel(
        serverToClient.getInputStream(), clientToServer.getOutputStream());
    new CheckVersionsMessage(client, 2, 3,
        HostedHtmlVersion.EXPECTED_GWT_ONLOAD_VERSION).send();
    MessageType type = client.readMessageType();
    assertEquals(MessageType.PROTOCOL_VERSION, type);
    ProtocolVersionMessage protocolMessage = ProtocolVersionMessage.receive(
        client);
    assertEquals(3, protocolMessage.getProtocolVersion());
    new LoadModuleMessage(client, "url", "tabkey", "session", "testModule",
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.shell.BrowserChannel.MessageType

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.