http://gwt-code-reviews.appspot.com/646803/diff/1/12
File user/src/com/google/gwt/dom/client/MessageEvent.java (right):
http://gwt-code-reviews.appspot.com/646803/diff/1/12#newcode30
user/src/com/google/gwt/dom/client/MessageEvent.java:30: public final
String getData() {
On 2010/07/01 11:20:05, markovuksanovic wrote:
Mayebe we could just retrieve the data using natve method and
returning
this.data;
not that the result would be different, but just to keep retrieving
information
from event in the same way as the other two properties.
I suspect so -- I assumed you had a reason to go through DOMImpl, such
as some browsers might name the property something different. If that
isn't the case, then we can just directly reference it here.
http://gwt-code-reviews.appspot.com/646803/diff/1/20
File user/test/com/google/gwt/dom/client/WebSocketTest.java (right):
http://gwt-code-reviews.appspot.com/646803/diff/1/20#newcode174
user/test/com/google/gwt/dom/client/WebSocketTest.java:174: private
static MockRawWebSocket mockRawSocket;
On 2010/07/01 13:10:33, markovuksanovic wrote:
What about adding a protected constructor into WebSocket which would
accept an
additional parameter which would be the mockRawWebSocket
@SuppressWarnings("unused")
protected WebSocket(String url, String subProtocol, RawWebSocket
socket) {
rawWebSocket = socket;
}
and here in test you would have:
private static class MockWebSocket extends WebSocket {
public MockWebSocket(String url, String subProtocol,
MockRawWebSocket
mockRawSocket) {
super(url, subProtocol, mockRawSocket);
}
public static MockWebSocket create(MockRawWebSocket mockRawSocket)
{
return new MockWebSocket(mockRawSocket.getURL(), null,
mockRawSocket);
}
}
I think that hack would be gone - though haven't tried this yet.
Done.
http://gwt-code-reviews.appspot.com/646803/show
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors