Bug 573422 - WebSocket .URL should be .url, r=sicking

--HG--
extra : rebase_source : 4dd3004568043ce8c3ec7e16f116de2639e3d6ee
This commit is contained in:
Olli Pettay 2010-06-21 22:56:03 +03:00
parent 6af3d8672d
commit f85b378433
3 changed files with 5 additions and 3 deletions

View File

@ -51,10 +51,10 @@ interface nsPIDOMWindow;
* http://dev.w3.org/html5/websockets/
*
*/
[scriptable, uuid(af0d293a-d18c-43e6-84ed-d1de5e85b885)]
[scriptable, uuid(4403cd57-07fc-477f-a062-d6ba7dd0781b)]
interface nsIWebSocket : nsISupports
{
readonly attribute DOMString URL;
readonly attribute DOMString url;
//ready state
const unsigned short CONNECTING = 0;

View File

@ -3215,7 +3215,7 @@ nsWebSocket::SetProtocol(const nsString& aProtocol)
//-----------------------------------------------------------------------------
NS_IMETHODIMP
nsWebSocket::GetURL(nsAString& aURL)
nsWebSocket::GetUrl(nsAString& aURL)
{
aURL = mOriginalURL;
return NS_OK;

View File

@ -30,7 +30,9 @@ function forcegc(){
}
function testWebSocket () {
var url = "ws://mochi.test:8888/tests/content/base/test/file_ws_basic_tests";
ws = new WebSocket("ws://mochi.test:8888/tests/content/base/test/file_ws_basic_tests", "test");
is(ws.url, url, "Wrong Websocket.url!");
ws.onopen = function(e) {
for (var i = 0; i < params.length; ++i) {
document.getElementById('log').textContent += "sending " + params[i] + "\n";