Bug 1147990 - websocket test suite - patch 1 - URL with #ref should not be accepted, r=smaug

This commit is contained in:
Andrea Marchesini 2015-03-31 11:39:03 +01:00
parent 22516b7d1e
commit 871a9e2a83
2 changed files with 3 additions and 8 deletions

View File

@ -1865,9 +1865,9 @@ WebSocketImpl::ParseURL(const nsAString& aURL)
nsCOMPtr<nsIURL> parsedURL = do_QueryInterface(uri, &rv);
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
nsAutoCString fragment;
rv = parsedURL->GetRef(fragment);
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && fragment.IsEmpty(),
bool hasRef;
rv = parsedURL->GetHasRef(&hasRef);
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && !hasRef,
NS_ERROR_DOM_SYNTAX_ERR);
nsAutoCString scheme;

View File

@ -1,5 +0,0 @@
[002.html]
type: testharness
[WebSockets: new WebSocket(invalid url) 6]
expected: FAIL