From 46de97b2a829b9ad21a1d54a0339421724cddf7f Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 10 Feb 2014 16:02:45 -0800 Subject: [PATCH] Backed out changeset 754428833970 (bug 936340) for mochitest-3 failures on a CLOSED TREE --- content/base/public/nsContentPolicyUtils.h | 1 - content/base/public/nsIContentPolicy.idl | 5 - content/base/src/contentSecurityPolicy.js | 1 - content/base/src/nsMixedContentBlocker.cpp | 3 - .../base/test/file_mixed_content_main.html | 2 - dom/base/Navigator.cpp | 281 ------------------ dom/base/Navigator.h | 7 - dom/tests/mochitest/beacon/beacon-frame.html | 24 -- dom/tests/mochitest/beacon/beacon-handler.sjs | 83 ------ .../mochitest/beacon/beacon-set-cookie.sjs | 8 - dom/tests/mochitest/beacon/mochitest.ini | 11 - dom/tests/mochitest/beacon/moz.build | 8 - dom/tests/mochitest/beacon/test_beacon.html | 49 --- .../beacon/test_beaconContentPolicy.html | 97 ------ .../mochitest/beacon/test_beaconCookies.html | 49 --- .../mochitest/beacon/test_beaconFrame.html | 118 -------- .../beacon/test_beaconPreflight.html | 36 --- dom/tests/mochitest/moz.build | 1 - dom/webidl/Navigator.webidl | 7 - netwerk/mime/nsMimeTypes.h | 1 - 20 files changed, 792 deletions(-) delete mode 100644 dom/tests/mochitest/beacon/beacon-frame.html delete mode 100644 dom/tests/mochitest/beacon/beacon-handler.sjs delete mode 100644 dom/tests/mochitest/beacon/beacon-set-cookie.sjs delete mode 100644 dom/tests/mochitest/beacon/mochitest.ini delete mode 100644 dom/tests/mochitest/beacon/moz.build delete mode 100644 dom/tests/mochitest/beacon/test_beacon.html delete mode 100644 dom/tests/mochitest/beacon/test_beaconContentPolicy.html delete mode 100644 dom/tests/mochitest/beacon/test_beaconCookies.html delete mode 100644 dom/tests/mochitest/beacon/test_beaconFrame.html delete mode 100644 dom/tests/mochitest/beacon/test_beaconPreflight.html diff --git a/content/base/public/nsContentPolicyUtils.h b/content/base/public/nsContentPolicyUtils.h index 448d49b8d7d..695932eab72 100644 --- a/content/base/public/nsContentPolicyUtils.h +++ b/content/base/public/nsContentPolicyUtils.h @@ -110,7 +110,6 @@ NS_CP_ContentTypeName(uint32_t contentType) CASE_RETURN( TYPE_WEBSOCKET ); CASE_RETURN( TYPE_CSP_REPORT ); CASE_RETURN( TYPE_XSLT ); - CASE_RETURN( TYPE_BEACON ); default: return ""; } diff --git a/content/base/public/nsIContentPolicy.idl b/content/base/public/nsIContentPolicy.idl index 0834cb1ccf4..46367502970 100644 --- a/content/base/public/nsIContentPolicy.idl +++ b/content/base/public/nsIContentPolicy.idl @@ -145,11 +145,6 @@ interface nsIContentPolicy : nsISupports */ const nsContentPolicyType TYPE_XSLT = 18; - /** - * Indicates a beacon post. - */ - const nsContentPolicyType TYPE_BEACON = 19; - /* When adding new content types, please update nsContentBlocker, * NS_CP_ContentTypeName, contentSecurityPolicy.js, all nsIContentPolicy * implementations, and other things that are not listed here that are diff --git a/content/base/src/contentSecurityPolicy.js b/content/base/src/contentSecurityPolicy.js index beaad28a9b4..27848b22ca3 100644 --- a/content/base/src/contentSecurityPolicy.js +++ b/content/base/src/contentSecurityPolicy.js @@ -97,7 +97,6 @@ function ContentSecurityPolicy() { csp._MAPPINGS[cp.TYPE_MEDIA] = cspr_sd_new.MEDIA_SRC; csp._MAPPINGS[cp.TYPE_FONT] = cspr_sd_new.FONT_SRC; csp._MAPPINGS[cp.TYPE_XSLT] = cspr_sd_new.SCRIPT_SRC; - csp._MAPPINGS[cp.TYPE_BEACON] = cspr_sd_new.CONNECT_SRC; /* Our original CSP implementation's mappings for XHR and websocket * These should be changed to be = cspr_sd.CONNECT_SRC when we remove diff --git a/content/base/src/nsMixedContentBlocker.cpp b/content/base/src/nsMixedContentBlocker.cpp index 442737b8303..eff0f3d7bd7 100644 --- a/content/base/src/nsMixedContentBlocker.cpp +++ b/content/base/src/nsMixedContentBlocker.cpp @@ -242,8 +242,6 @@ nsMixedContentBlocker::ShouldLoad(uint32_t aContentType, // spoofing attacks (e.g. make a "grant permission" button look like a // "refuse permission" button). // - // TYPE_BEACON: Beacon requests are similar to TYPE_PING, but are default on. - // // TYPE_WEBSOCKET: The Websockets API requires browsers to // reject mixed-content websockets: "If secure is false but the origin of // the entry script has a scheme component that is itself a secure protocol, @@ -287,7 +285,6 @@ nsMixedContentBlocker::ShouldLoad(uint32_t aContentType, case TYPE_MEDIA: case TYPE_OBJECT_SUBREQUEST: case TYPE_PING: - case TYPE_BEACON: classification = eMixedDisplay; break; diff --git a/content/base/test/file_mixed_content_main.html b/content/base/test/file_mixed_content_main.html index ce736376143..ed4e2984709 100644 --- a/content/base/test/file_mixed_content_main.html +++ b/content/base/test/file_mixed_content_main.html @@ -30,8 +30,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178 case nsIContentPolicy::TYPE_MEDIA: case nsIContentPolicy::TYPE_PING: our ping implementation is off by default and does not comply with the current spec (bug 786347) - case nsIContentPolicy::TYPE_BEACON: - } */ --> diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index d3f5e856a12..6c7a81ee69d 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -15,11 +15,6 @@ #include "mozilla/dom/DesktopNotification.h" #include "nsGeolocation.h" #include "nsIHttpProtocolHandler.h" -#include "nsIContentPolicy.h" -#include "nsIContentSecurityPolicy.h" -#include "nsContentPolicyUtils.h" -#include "nsCrossSiteListenerProxy.h" -#include "nsISupportsPriority.h" #include "nsICachingChannel.h" #include "nsIWebContentHandlerRegistrar.h" #include "nsICookiePermission.h" @@ -50,19 +45,14 @@ #endif #include "nsIIdleObserver.h" #include "nsIPermissionManager.h" -#include "nsMimeTypes.h" #include "nsNetUtil.h" #include "nsIHttpChannel.h" -#include "nsIHttpChannelInternal.h" #include "TimeManager.h" #include "DeviceStorage.h" #include "nsIDOMNavigatorSystemMessages.h" -#include "nsStreamUtils.h" #include "nsIAppsService.h" #include "mozIApplication.h" #include "WidgetUtils.h" -#include "mozIThirdPartyUtil.h" -#include "nsChannelPolicy.h" #ifdef MOZ_MEDIA_NAVIGATOR #include "MediaManager.h" @@ -89,9 +79,6 @@ #include "mozilla/dom/NavigatorBinding.h" #include "mozilla/dom/Promise.h" -#include "nsIUploadChannel2.h" -#include "nsFormData.h" - namespace mozilla { namespace dom { @@ -1001,274 +988,6 @@ Navigator::GetGeolocation(ErrorResult& aRv) return mGeolocation; } -class BeaconStreamListener MOZ_FINAL : public nsIStreamListener -{ - public: - BeaconStreamListener() {} - - NS_DECL_ISUPPORTS - NS_DECL_NSISTREAMLISTENER - NS_DECL_NSIREQUESTOBSERVER -}; - -NS_IMPL_ISUPPORTS2(BeaconStreamListener, - nsIStreamListener, - nsIRequestObserver) - - -NS_IMETHODIMP -BeaconStreamListener::OnStartRequest(nsIRequest *aRequest, - nsISupports *aContext) -{ - aRequest->Cancel(NS_ERROR_NET_INTERRUPT); - return NS_BINDING_ABORTED; -} - -NS_IMETHODIMP -BeaconStreamListener::OnStopRequest(nsIRequest *aRequest, - nsISupports *aContext, - nsresult aStatus) -{ - return NS_OK; -} - -NS_IMETHODIMP -BeaconStreamListener::OnDataAvailable(nsIRequest *aRequest, - nsISupports *ctxt, - nsIInputStream *inStr, - uint64_t sourceOffset, - uint32_t count) -{ - MOZ_ASSERT(false); - return NS_OK; -} - -bool -Navigator::SendBeacon(const nsAString& aUrl, - const ArrayBufferViewOrBlobOrStringOrFormData& aData, - ErrorResult& aRv) -{ - if (!mWindow) { - aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR); - return false; - } - - nsCOMPtr doc = mWindow->GetDoc(); - if (!doc) { - aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR); - return false; - } - - nsIURI* documentURI = doc->GetDocumentURI(); - if (!documentURI) { - aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR); - return false; - } - - nsCOMPtr uri; - nsresult rv = nsContentUtils::NewURIWithDocumentCharset( - getter_AddRefs(uri), - aUrl, - doc, - doc->GetDocBaseURI()); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_DOM_URL_MISMATCH_ERR); - return false; - } - - // Check whether this is a sane URI to load - // Explicitly disallow things like chrome:, javascript:, and data: URIs - nsCOMPtr principal = doc->NodePrincipal(); - nsCOMPtr secMan = nsContentUtils::GetSecurityManager(); - uint32_t flags = nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL - & nsIScriptSecurityManager::DISALLOW_SCRIPT; - rv = secMan->CheckLoadURIWithPrincipal(principal, - uri, - flags); - if (NS_FAILED(rv)) { - // Bad URI - aRv.Throw(rv); - return false; - } - - // Check whether the CSP allows us to load - int16_t shouldLoad = nsIContentPolicy::ACCEPT; - rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_BEACON, - uri, - principal, - doc, - EmptyCString(), //mime guess - nullptr, //extra - &shouldLoad, - nsContentUtils::GetContentPolicy(), - nsContentUtils::GetSecurityManager()); - if (NS_FAILED(rv) || NS_CP_REJECTED(shouldLoad)) { - // Disallowed by content policy - aRv.Throw(NS_ERROR_CONTENT_BLOCKED); - return false; - } - - nsCOMPtr channel; - nsCOMPtr channelPolicy; - nsCOMPtr csp; - rv = principal->GetCsp(getter_AddRefs(csp)); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - - if (csp) { - channelPolicy = do_CreateInstance(NSCHANNELPOLICY_CONTRACTID); - channelPolicy->SetContentSecurityPolicy(csp); - channelPolicy->SetLoadType(nsIContentPolicy::TYPE_BEACON); - } - rv = NS_NewChannel(getter_AddRefs(channel), - uri, - nullptr, - nullptr, - nullptr, - nsIRequest::LOAD_NORMAL, - channelPolicy); - if (NS_FAILED(rv)) { - aRv.Throw(rv); - return false; - } - - nsCOMPtr httpChannel = do_QueryInterface(channel); - if (!httpChannel) { - // Beacon spec only supports HTTP requests at this time - aRv.Throw(NS_ERROR_DOM_BAD_URI); - return false; - } - httpChannel->SetReferrer(documentURI); - - // Anything that will need to refer to the window during the request - // will need to be done now. For example, detection of whether any - // cookies set by this request are foreign. Note that ThirdPartyUtil - // (nsIThirdPartyUtil.isThirdPartyChannel) does a secondary check between - // the channel URI and the cookie URI even when forceAllowThirdPartyCookie - // is set, so this is safe with regard to redirects. - nsCOMPtr httpChannelInternal(do_QueryInterface(channel)); - nsCOMPtr thirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID); - if (!httpChannelInternal) { - aRv.Throw(NS_ERROR_DOM_BAD_URI); - return false; - } - bool isForeign = true; - thirdPartyUtil->IsThirdPartyWindow(mWindow, uri, &isForeign); - httpChannelInternal->SetForceAllowThirdPartyCookie(!isForeign); - - nsCString mimeType; - nsCOMPtr in; - - if (aData.IsString()) { - nsCString stringData = NS_ConvertUTF16toUTF8(aData.GetAsString()); - nsCOMPtr strStream = do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID, &rv); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - rv = strStream->SetData(stringData.BeginReading(), stringData.Length()); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - mimeType.AssignLiteral("text/plain;charset=UTF-8"); - in = strStream; - - } else if (aData.IsArrayBufferView()) { - - nsCOMPtr strStream = do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID, &rv); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - - rv = strStream->SetData(reinterpret_cast(aData.GetAsArrayBufferView().Data()), - aData.GetAsArrayBufferView().Length()); - - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - mimeType.AssignLiteral("application/octet-stream"); - in = strStream; - - } else if (aData.IsBlob()) { - nsCOMPtr blob = aData.GetAsBlob(); - rv = blob->GetInternalStream(getter_AddRefs(in)); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - nsAutoString type; - rv = blob->GetType(type); - if (NS_FAILED(rv)) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - mimeType = NS_ConvertUTF16toUTF8(type); - - } else if (aData.IsFormData()) { - nsFormData& form = aData.GetAsFormData(); - uint64_t len; - nsAutoCString charset; - form.GetSendInfo(getter_AddRefs(in), - &len, - mimeType, - charset); - } else { - MOZ_ASSERT(false, "switch statements not in sync"); - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - - nsCOMPtr uploadChannel = do_QueryInterface(channel); - if (!uploadChannel) { - aRv.Throw(NS_ERROR_FAILURE); - return false; - } - uploadChannel->ExplicitSetUploadStream(in, mimeType, -1, - NS_LITERAL_CSTRING("POST"), - false); - - nsCOMPtr p = do_QueryInterface(channel); - if (p) { - p->SetPriority(nsISupportsPriority::PRIORITY_LOWEST); - } - - nsRefPtr cors = new nsCORSListenerProxy(new BeaconStreamListener(), - principal, - true); - - // Start a preflight if cross-origin and content type is not whitelisted - rv = secMan->CheckSameOriginURI(documentURI, uri, false); - bool crossOrigin = NS_FAILED(rv); - nsAutoCString contentType, parsedCharset; - rv = NS_ParseContentType(mimeType, contentType, parsedCharset); - if (crossOrigin && - !contentType.Equals(APPLICATION_WWW_FORM_URLENCODED) && - !contentType.Equals(MULTIPART_FORM_DATA) && - !contentType.Equals(TEXT_PLAIN)) { - nsCOMPtr preflightChannel; - nsTArray unsafeHeaders; - unsafeHeaders.AppendElement(NS_LITERAL_CSTRING("Content-Type")); - rv = NS_StartCORSPreflight(channel, - cors, - principal, - true, - unsafeHeaders, - getter_AddRefs(preflightChannel)); - } else { - rv = channel->AsyncOpen(cors, nullptr); - } - if (NS_FAILED(rv)) { - aRv.Throw(rv); - return false; - } - return true; -} - #ifdef MOZ_MEDIA_NAVIGATOR void Navigator::MozGetUserMedia(JSContext* aCx, diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index 01d25285435..ef02e19ec7e 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -24,7 +24,6 @@ class nsIDOMMozMobileMessageManager; class nsIDOMNavigatorSystemMessages; class nsDOMCameraManager; class nsDOMDeviceStorage; -class nsIDOMBlob; namespace mozilla { namespace dom { @@ -33,7 +32,6 @@ class systemMessageCallback; class MediaStreamConstraints; class MediaStreamConstraintsInternal; class WakeLock; -class ArrayBufferViewOrBlobOrStringOrFormData; } } @@ -223,11 +221,6 @@ public: #ifdef MOZ_AUDIO_CHANNEL_MANAGER system::AudioChannelManager* GetMozAudioChannelManager(ErrorResult& aRv); #endif // MOZ_AUDIO_CHANNEL_MANAGER - - bool SendBeacon(const nsAString& aUrl, - const ArrayBufferViewOrBlobOrStringOrFormData& aData, - ErrorResult& aRv); - #ifdef MOZ_MEDIA_NAVIGATOR void MozGetUserMedia(JSContext* aCx, const MediaStreamConstraints& aConstraints, diff --git a/dom/tests/mochitest/beacon/beacon-frame.html b/dom/tests/mochitest/beacon/beacon-frame.html deleted file mode 100644 index 3a90540b6ec..00000000000 --- a/dom/tests/mochitest/beacon/beacon-frame.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - Frame for sendBeacon - - - - - - - diff --git a/dom/tests/mochitest/beacon/beacon-handler.sjs b/dom/tests/mochitest/beacon/beacon-handler.sjs deleted file mode 100644 index 8bb87f6ff59..00000000000 --- a/dom/tests/mochitest/beacon/beacon-handler.sjs +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const CC = Components.Constructor; -const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1", - "nsIBinaryInputStream", - "setInputStream"); - -function DEBUG(str) -{ - // dump("********** " + str); -} - -function handleRequest(request, response) { - DEBUG("Entered request handler"); - response.setHeader("Cache-Control", "no-cache", false); - - if (request.method == "GET") { - response.setHeader("Content-Type", "application/json", false); - switch (request.queryString) { - case "getLastBeacon": - var data = getState("beaconData"); - var mimetype = getState("beaconMimetype"); - DEBUG("GET was sending : " + data + "\n"); - DEBUG("GET was sending : " + mimetype + "\n"); - var result = { - "data": data, - "mimetype": mimetype, - }; - response.write(JSON.stringify(result)); - break; - default: - response.setStatusLine(request.httpVersion, 400, "Bad Request"); - break; - } - return; - } - - if (request.method == "POST") { - var body = new BinaryInputStream(request.bodyInputStream); - var avail; - var bytes = []; - - while ((avail = body.available()) > 0) { - Array.prototype.push.apply(bytes, body.readByteArray(avail)); - } - - var data = ""; - for (var i=0; i < bytes.length; i++) { - // We are only passing strings at this point. - if (bytes[i] < 32) continue; - var charcode = String.fromCharCode(bytes[i]); - data += charcode; - } - - var mimetype = request.getHeader("Content-Type"); - - // check to see if this is form data. - if (mimetype.indexOf("multipart/form-data") != -1) { - - // trim the mime type to make testing easier. - mimetype = "multipart/form-data"; - // Extract only the form-data name. - - var pattern = /; name=\"(.+)\";/; - data = data.split(pattern)[1]; - } - - DEBUG("********** POST was sending : " + data + "\n"); - DEBUG("********** POST was sending : " + mimetype + "\n"); - setState("beaconData", data); - setState("beaconMimetype", mimetype); - - response.setHeader("Content-Type", "text/plain", false); - response.write('ok'); - return; - } - - response.setStatusLine(request.httpVersion, 402, "Bad Request"); -} diff --git a/dom/tests/mochitest/beacon/beacon-set-cookie.sjs b/dom/tests/mochitest/beacon/beacon-set-cookie.sjs deleted file mode 100644 index 341620eae86..00000000000 --- a/dom/tests/mochitest/beacon/beacon-set-cookie.sjs +++ /dev/null @@ -1,8 +0,0 @@ -function handleRequest(request, response) -{ - response.setHeader("Set-Cookie", "cookie="+ request.host + "~" + Math.random()); - response.setHeader("Content-Type", "text/plain", false); - response.setHeader("Cache-Control", "no-cache", false); - - response.setStatusLine(request.httpVersion, 200, "OK"); -} diff --git a/dom/tests/mochitest/beacon/mochitest.ini b/dom/tests/mochitest/beacon/mochitest.ini deleted file mode 100644 index c1665346b36..00000000000 --- a/dom/tests/mochitest/beacon/mochitest.ini +++ /dev/null @@ -1,11 +0,0 @@ -[DEFAULT] -support-files = beacon-frame.html - beacon-handler.sjs - beacon-set-cookie.sjs - -[test_beacon.html] -[test_beaconFrame.html] -[test_beaconPreflight.html] -[test_beaconCookies.html] -[test_beaconContentPolicy.html] -[test_beaconElectrolysis.html] diff --git a/dom/tests/mochitest/beacon/moz.build b/dom/tests/mochitest/beacon/moz.build deleted file mode 100644 index 3cf16eb0cfe..00000000000 --- a/dom/tests/mochitest/beacon/moz.build +++ /dev/null @@ -1,8 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -MOCHITEST_MANIFESTS += ['mochitest.ini'] - diff --git a/dom/tests/mochitest/beacon/test_beacon.html b/dom/tests/mochitest/beacon/test_beacon.html deleted file mode 100644 index 08bdb349f50..00000000000 --- a/dom/tests/mochitest/beacon/test_beacon.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Test for beacon - - - - -Mozilla Bug 936340 -

- -
-
-
-
-
- - - diff --git a/dom/tests/mochitest/beacon/test_beaconContentPolicy.html b/dom/tests/mochitest/beacon/test_beaconContentPolicy.html deleted file mode 100644 index c098bef3fa5..00000000000 --- a/dom/tests/mochitest/beacon/test_beaconContentPolicy.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - Test for Bug 936340 - - - - -Mozilla Bug 936340 -

- -
-
-
- - diff --git a/dom/tests/mochitest/beacon/test_beaconCookies.html b/dom/tests/mochitest/beacon/test_beaconCookies.html deleted file mode 100644 index 00532a74317..00000000000 --- a/dom/tests/mochitest/beacon/test_beaconCookies.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Test for Bug 936340 - - - - -Mozilla Bug 936340 -

- -
-
-
- - diff --git a/dom/tests/mochitest/beacon/test_beaconFrame.html b/dom/tests/mochitest/beacon/test_beaconFrame.html deleted file mode 100644 index 42eb73b45bb..00000000000 --- a/dom/tests/mochitest/beacon/test_beaconFrame.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Test for beacon - - - - -Mozilla Bug 936340 -

- -
-
- -
-
-
- - - diff --git a/dom/tests/mochitest/beacon/test_beaconPreflight.html b/dom/tests/mochitest/beacon/test_beaconPreflight.html deleted file mode 100644 index e97fffaa2eb..00000000000 --- a/dom/tests/mochitest/beacon/test_beaconPreflight.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Test for Bug 936340 - - - - -Mozilla Bug 936340 -

- -
-
-
- - diff --git a/dom/tests/mochitest/moz.build b/dom/tests/mochitest/moz.build index c3efa628190..cb06109505a 100644 --- a/dom/tests/mochitest/moz.build +++ b/dom/tests/mochitest/moz.build @@ -7,7 +7,6 @@ DIRS += [ 'dom-level0', 'ajax', - 'beacon', 'bugs', 'chrome', 'crypto', diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl index 89783d54003..589a5f197b3 100644 --- a/dom/webidl/Navigator.webidl +++ b/dom/webidl/Navigator.webidl @@ -11,7 +11,6 @@ * http://www.w3.org/TR/vibration/#vibration-interface * http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1 * https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension - * http://www.w3.org/TR/beacon/#sec-beacon-method * * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and * Opera Software ASA. You are granted a license to use, reproduce @@ -344,9 +343,3 @@ partial interface Navigator { NavigatorUserMediaErrorCallback onerror); }; #endif // MOZ_MEDIA_NAVIGATOR - -partial interface Navigator { - [Throws, Pref="beacon.enabled"] - boolean sendBeacon(DOMString url, - (ArrayBufferView or Blob or DOMString or FormData) data); -}; diff --git a/netwerk/mime/nsMimeTypes.h b/netwerk/mime/nsMimeTypes.h index 8f53b757667..faa596de192 100644 --- a/netwerk/mime/nsMimeTypes.h +++ b/netwerk/mime/nsMimeTypes.h @@ -111,7 +111,6 @@ #define MULTIPART_ALTERNATIVE "multipart/alternative" #define MULTIPART_APPLEDOUBLE "multipart/appledouble" #define MULTIPART_DIGEST "multipart/digest" -#define MULTIPART_FORM_DATA "multipart/form-data" #define MULTIPART_HEADER_SET "multipart/header-set" #define MULTIPART_MIXED "multipart/mixed" #define MULTIPART_PARALLEL "multipart/parallel"