diff --git a/accessible/generic/Accessible.cpp b/accessible/generic/Accessible.cpp
index 9cd70b8e16..7f451ff898 100644
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -65,7 +65,6 @@
#include "nsIServiceManager.h"
#include "nsWhitespaceTokenizer.h"
#include "nsAttrName.h"
-#include "nsNetUtil.h"
#ifdef DEBUG
#include "nsIDOMCharacterData.h"
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
index 8c2928c58e..3d01f8f4e9 100644
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -7,6 +7,8 @@
#include "AboutRedirector.h"
#include "nsNetUtil.h"
+#include "nsIChannel.h"
+#include "nsIURI.h"
#include "nsIScriptSecurityManager.h"
#include "mozilla/ArrayUtils.h"
#include "nsDOMString.h"
diff --git a/browser/components/migration/nsIEHistoryEnumerator.cpp b/browser/components/migration/nsIEHistoryEnumerator.cpp
index 77ec2e8520..8cdc6e15cd 100644
--- a/browser/components/migration/nsIEHistoryEnumerator.cpp
+++ b/browser/components/migration/nsIEHistoryEnumerator.cpp
@@ -9,6 +9,7 @@
#include "nsStringAPI.h"
#include "nsNetUtil.h"
+#include "prtime.h"
#include "nsIVariant.h"
#include "nsCOMArray.h"
#include "nsArrayEnumerator.h"
diff --git a/browser/components/shell/nsGNOMEShellService.cpp b/browser/components/shell/nsGNOMEShellService.cpp
index 14510d1113..4d95655887 100644
--- a/browser/components/shell/nsGNOMEShellService.cpp
+++ b/browser/components/shell/nsGNOMEShellService.cpp
@@ -21,7 +21,8 @@
#include "nsIStringBundle.h"
#include "nsIOutputStream.h"
#include "nsIProcess.h"
-#include "nsNetUtil.h"
+#include "nsServiceManagerUtils.h"
+#include "nsComponentManagerUtils.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsIImageLoadingContent.h"
#include "imgIRequest.h"
diff --git a/browser/components/shell/nsMacShellService.cpp b/browser/components/shell/nsMacShellService.cpp
index 914b9ae653..0ad2e71676 100644
--- a/browser/components/shell/nsMacShellService.cpp
+++ b/browser/components/shell/nsMacShellService.cpp
@@ -17,7 +17,8 @@
#include "nsIURL.h"
#include "nsIWebBrowserPersist.h"
#include "nsMacShellService.h"
-#include "nsNetUtil.h"
+#include "nsIProperties.h"
+#include "nsServiceManagerUtils.h"
#include "nsShellService.h"
#include "nsStringAPI.h"
#include "nsIDocShell.h"
diff --git a/browser/components/shell/nsWindowsShellService.cpp b/browser/components/shell/nsWindowsShellService.cpp
index 813ec4fe12..714cff0c32 100644
--- a/browser/components/shell/nsWindowsShellService.cpp
+++ b/browser/components/shell/nsWindowsShellService.cpp
@@ -15,6 +15,7 @@
#include "nsIServiceManager.h"
#include "nsIStringBundle.h"
#include "nsNetUtil.h"
+#include "nsServiceManagerUtils.h"
#include "nsShellService.h"
#include "nsWindowsShellService.h"
#include "nsIProcess.h"
diff --git a/caps/BasePrincipal.cpp b/caps/BasePrincipal.cpp
index 67b988ac00..7463c3cbba 100644
--- a/caps/BasePrincipal.cpp
+++ b/caps/BasePrincipal.cpp
@@ -12,6 +12,7 @@
#include "nsPrincipal.h"
#include "nsNetUtil.h"
+#include "nsIURIWithPrincipal.h"
#include "nsNullPrincipal.h"
#include "nsScriptSecurityManager.h"
diff --git a/caps/nsNullPrincipal.cpp b/caps/nsNullPrincipal.cpp
index 5dba6f941c..cc32748425 100644
--- a/caps/nsNullPrincipal.cpp
+++ b/caps/nsNullPrincipal.cpp
@@ -15,7 +15,7 @@
#include "nsNullPrincipal.h"
#include "nsNullPrincipalURI.h"
#include "nsMemory.h"
-#include "nsNetUtil.h"
+#include "nsIURIWithPrincipal.h"
#include "nsIClassInfoImpl.h"
#include "nsNetCID.h"
#include "nsError.h"
diff --git a/caps/nsNullPrincipalURI.cpp b/caps/nsNullPrincipalURI.cpp
index 9d092ed376..74118bc00f 100644
--- a/caps/nsNullPrincipalURI.cpp
+++ b/caps/nsNullPrincipalURI.cpp
@@ -11,7 +11,6 @@
#include "mozilla/ipc/URIParams.h"
-#include "nsNetUtil.h"
#include "nsEscape.h"
#include "nsCRT.h"
#include "nsIUUIDGenerator.h"
diff --git a/caps/nsPrincipal.cpp b/caps/nsPrincipal.cpp
index e88f336c70..fffbf59b94 100644
--- a/caps/nsPrincipal.cpp
+++ b/caps/nsPrincipal.cpp
@@ -13,6 +13,8 @@
#include "nsReadableUtils.h"
#include "pratom.h"
#include "nsIURI.h"
+#include "nsIURL.h"
+#include "nsIURIWithPrincipal.h"
#include "nsJSPrincipals.h"
#include "nsIEffectiveTLDService.h"
#include "nsIClassInfoImpl.h"
diff --git a/chrome/nsChromeProtocolHandler.cpp b/chrome/nsChromeProtocolHandler.cpp
index 2246565cfb..f4eec56d47 100644
--- a/chrome/nsChromeProtocolHandler.cpp
+++ b/chrome/nsChromeProtocolHandler.cpp
@@ -23,6 +23,8 @@
#include "nsIScriptSecurityManager.h"
#include "nsIStandardURL.h"
#include "nsNetUtil.h"
+#include "nsNetCID.h"
+#include "nsIURL.h"
#include "nsString.h"
#include "nsStandardURL.h"
diff --git a/docshell/base/SerializedLoadContext.cpp b/docshell/base/SerializedLoadContext.cpp
index f328845b64..0af32e5fd3 100644
--- a/docshell/base/SerializedLoadContext.cpp
+++ b/docshell/base/SerializedLoadContext.cpp
@@ -7,6 +7,7 @@
#include "SerializedLoadContext.h"
#include "nsNetUtil.h"
#include "nsIChannel.h"
+#include "nsIPrivateBrowsingChannel.h"
#include "nsIWebSocketChannel.h"
namespace IPC {
diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp
index 4183c187b2..938317c8a4 100644
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -4,7 +4,9 @@
* 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/. */
+#include "nsNetCID.h"
#include "nsNetUtil.h"
+#include "nsIProtocolHandler.h"
#include "nsCRT.h"
#include "nsIFile.h"
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index bf72005b4b..c130430451 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -19,6 +19,7 @@
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/workers/ServiceWorkerManager.h"
#include "mozilla/EventStateManager.h"
+#include "mozilla/LoadInfo.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/StartupTimeline.h"
@@ -38,6 +39,7 @@
#include "nsCURILoader.h"
#include "nsDocShellCID.h"
#include "nsDOMCID.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "mozilla/net/ReferrerPolicy.h"
#include "nsRect.h"
@@ -182,13 +184,18 @@
#include "nsIDOMNode.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIHttpChannel.h"
+#include "nsIIDNService.h"
+#include "nsIInputStreamChannel.h"
+#include "nsINestedURI.h"
#include "nsISHContainer.h"
#include "nsISHistory.h"
#include "nsISecureBrowserUI.h"
+#include "nsISocketProvider.h"
#include "nsIStringBundle.h"
#include "nsISupportsArray.h"
#include "nsIURIFixup.h"
#include "nsIURILoader.h"
+#include "nsIURL.h"
#include "nsIWebBrowserFind.h"
#include "nsIWidget.h"
#include "mozilla/dom/EncodingUtils.h"
diff --git a/dom/archivereader/ArchiveReader.cpp b/dom/archivereader/ArchiveReader.cpp
index cc0d445d8e..76ce16bc96 100644
--- a/dom/archivereader/ArchiveReader.cpp
+++ b/dom/archivereader/ArchiveReader.cpp
@@ -10,7 +10,7 @@
#include "ArchiveZipEvent.h"
#include "nsIURI.h"
-#include "nsNetUtil.h"
+#include "nsNetCID.h"
#include "mozilla/dom/ArchiveReaderBinding.h"
#include "mozilla/dom/BindingDeclarations.h"
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 6a753e4587..3a147605ae 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -29,7 +29,6 @@
#include "nsILinkHandler.h"
#include "nsIScriptGlobalObject.h"
#include "nsIURL.h"
-#include "nsNetUtil.h"
#include "nsContainerFrame.h"
#include "nsIAnonymousContentCreator.h"
#include "nsIPresShell.h"
diff --git a/dom/base/EventSource.cpp b/dom/base/EventSource.cpp
index 21af38d9f6..14444003a0 100644
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -15,6 +15,9 @@
#include "mozilla/dom/ScriptSettings.h"
#include "nsNetUtil.h"
+#include "nsIAuthPrompt.h"
+#include "nsIAuthPrompt2.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsMimeTypes.h"
#include "nsIPromptFactory.h"
#include "nsIWindowWatcher.h"
diff --git a/dom/base/ImageEncoder.cpp b/dom/base/ImageEncoder.cpp
index a7d141867d..ba2d192b14 100644
--- a/dom/base/ImageEncoder.cpp
+++ b/dom/base/ImageEncoder.cpp
@@ -11,6 +11,7 @@
#include "mozilla/RefPtr.h"
#include "mozilla/SyncRunnable.h"
#include "gfxUtils.h"
+#include "nsNetUtil.h"
using namespace mozilla::gfx;
diff --git a/dom/base/ImageEncoder.h b/dom/base/ImageEncoder.h
index 47905d1168..fe3522daff 100644
--- a/dom/base/ImageEncoder.h
+++ b/dom/base/ImageEncoder.h
@@ -12,7 +12,6 @@
#include "mozilla/dom/File.h"
#include "mozilla/dom/HTMLCanvasElementBinding.h"
#include "nsLayoutUtils.h"
-#include "nsNetUtil.h"
#include "nsSize.h"
class nsICanvasRenderingContextInternal;
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 0e0b759b70..25e7e64d46 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -63,6 +63,9 @@
#include "nsIPermissionManager.h"
#include "nsMimeTypes.h"
#include "nsNetUtil.h"
+#include "nsStringStream.h"
+#include "nsComponentManagerUtils.h"
+#include "nsIStringStream.h"
#include "nsIHttpChannel.h"
#include "nsIHttpChannelInternal.h"
#include "TimeManager.h"
diff --git a/dom/base/ResponsiveImageSelector.cpp b/dom/base/ResponsiveImageSelector.cpp
index 8c9e837119..609ef00a64 100644
--- a/dom/base/ResponsiveImageSelector.cpp
+++ b/dom/base/ResponsiveImageSelector.cpp
@@ -9,7 +9,6 @@
#include "nsIDocument.h"
#include "nsContentUtils.h"
#include "nsPresContext.h"
-#include "nsNetUtil.h"
#include "nsCSSParser.h"
#include "nsCSSProps.h"
diff --git a/dom/base/ThirdPartyUtil.cpp b/dom/base/ThirdPartyUtil.cpp
index 16c1b462b3..e37992c337 100644
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -5,7 +5,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ThirdPartyUtil.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
+#include "nsIChannel.h"
#include "nsIServiceManager.h"
#include "nsIHttpChannelInternal.h"
#include "nsIDOMWindow.h"
diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp
index 744925c1a7..e4250d3e1b 100644
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -40,6 +40,8 @@
#include "nsJSUtils.h"
#include "nsIScriptError.h"
#include "nsNetUtil.h"
+#include "nsIAuthPrompt.h"
+#include "nsIAuthPrompt2.h"
#include "nsILoadGroup.h"
#include "mozilla/Preferences.h"
#include "xpcpublic.h"
diff --git a/dom/base/nsContentSink.cpp b/dom/base/nsContentSink.cpp
index 3f60173a89..cb8fcf40ba 100644
--- a/dom/base/nsContentSink.cpp
+++ b/dom/base/nsContentSink.cpp
@@ -20,6 +20,8 @@
#include "nsCPrefetchService.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
+#include "nsIMIMEHeaderParam.h"
+#include "nsIProtocolHandler.h"
#include "nsIHttpChannel.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
index dbd3123b82..93e9bb8e2d 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -135,6 +135,7 @@
#include "nsILoadContext.h"
#include "nsILoadGroup.h"
#include "nsIMemoryReporter.h"
+#include "nsIMIMEHeaderParam.h"
#include "nsIMIMEService.h"
#include "nsINode.h"
#include "mozilla/dom/NodeInfo.h"
@@ -156,6 +157,7 @@
#include "nsIStreamConverterService.h"
#include "nsIStringBundle.h"
#include "nsIURI.h"
+#include "nsIURIWithPrincipal.h"
#include "nsIURL.h"
#include "nsIWebNavigation.h"
#include "nsIWordBreaker.h"
diff --git a/dom/base/nsDOMDataChannel.cpp b/dom/base/nsDOMDataChannel.cpp
index a96da7373e..1eba17484a 100644
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -27,7 +27,6 @@ extern PRLogModuleInfo* GetDataChannelLog();
#include "nsContentUtils.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIScriptObjectPrincipal.h"
-#include "nsNetUtil.h"
#include "DataChannel.h"
diff --git a/dom/base/nsDOMFileReader.cpp b/dom/base/nsDOMFileReader.cpp
index cb0ef2fc7e..bcc11235b3 100644
--- a/dom/base/nsDOMFileReader.cpp
+++ b/dom/base/nsDOMFileReader.cpp
@@ -12,7 +12,6 @@
#include "nsError.h"
#include "nsIFile.h"
#include "nsNetCID.h"
-#include "nsNetUtil.h"
#include "nsXPCOM.h"
#include "nsIDOMEventListener.h"
diff --git a/dom/base/nsDataDocumentContentPolicy.cpp b/dom/base/nsDataDocumentContentPolicy.cpp
index 5154afb866..44e29a5328 100644
--- a/dom/base/nsDataDocumentContentPolicy.cpp
+++ b/dom/base/nsDataDocumentContentPolicy.cpp
@@ -13,6 +13,7 @@
#include "nsContentUtils.h"
#include "nsDataDocumentContentPolicy.h"
#include "nsNetUtil.h"
+#include "nsIProtocolHandler.h"
#include "nsScriptSecurityManager.h"
#include "nsIDocument.h"
#include "nsINode.h"
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index e84b40ccff..ad13cee240 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -84,7 +84,10 @@
#include "nsIScriptError.h"
#include "nsStyleSheetService.h"
-#include "nsNetUtil.h" // for NS_MakeAbsoluteURI
+#include "nsNetUtil.h" // for NS_NewURI
+#include "nsIInputStreamChannel.h"
+#include "nsIAuthPrompt.h"
+#include "nsIAuthPrompt2.h"
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 781a73a36c..a9638b048f 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -31,6 +31,7 @@
#include "mozilla/dom/WakeLock.h"
#include "mozilla/dom/power/PowerManagerService.h"
#include "nsIDocShellTreeOwner.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsIPermissionManager.h"
#include "nsIScriptContext.h"
#include "nsIScriptTimeoutHandler.h"
@@ -40,6 +41,7 @@
#include "nsWindowMemoryReporter.h"
#include "WindowNamedPropertiesHandler.h"
#include "nsFrameSelection.h"
+#include "nsNetUtil.h"
// Helper Classes
#include "nsJSUtils.h"
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
index a0dcbb46e6..2af977b2f0 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -76,7 +76,6 @@
#include "nsIWidget.h"
#include "nsLayoutUtils.h"
#include "nsNameSpaceManager.h"
-#include "nsNetUtil.h"
#include "nsNodeInfoManager.h"
#include "nsNodeUtils.h"
#include "nsPIBoxObject.h"
diff --git a/dom/base/nsInProcessTabChildGlobal.cpp b/dom/base/nsInProcessTabChildGlobal.cpp
index 92d7a28a31..41a8c34f83 100644
--- a/dom/base/nsInProcessTabChildGlobal.cpp
+++ b/dom/base/nsInProcessTabChildGlobal.cpp
@@ -11,7 +11,6 @@
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsComponentManagerUtils.h"
-#include "nsNetUtil.h"
#include "nsScriptLoader.h"
#include "nsFrameLoader.h"
#include "xpcpublic.h"
diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp
index 992d65ad3d..177626a04b 100644
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -34,7 +34,6 @@
#include "mozilla/EventDispatcher.h"
#include "nsIContent.h"
#include "nsCycleCollector.h"
-#include "nsNetUtil.h"
#include "nsXPCOMCIDInternal.h"
#include "nsIXULRuntime.h"
#include "nsTextFormatter.h"
diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp
index 756a8d7de7..37f5e0a8f6 100644
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -20,6 +20,7 @@
#include "nsIDOMHTMLObjectElement.h"
#include "nsIDOMHTMLAppletElement.h"
#include "nsIExternalProtocolHandler.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsIHttpChannelInternal.h"
#include "nsIObjectFrame.h"
#include "nsIPermissionManager.h"
diff --git a/dom/base/nsStyleLinkElement.cpp b/dom/base/nsStyleLinkElement.cpp
index 3cb51e5dac..f8992a0fef 100644
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -23,7 +23,6 @@
#include "nsIDOMComment.h"
#include "nsIDOMNode.h"
#include "nsIDOMStyleSheet.h"
-#include "nsNetUtil.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
#include "nsXPCOMCIDInternal.h"
diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp
index 27ec5f5c1e..54b29a01c8 100644
--- a/dom/base/nsXMLHttpRequest.cpp
+++ b/dom/base/nsXMLHttpRequest.cpp
@@ -29,6 +29,12 @@
#include "nsIURI.h"
#include "nsILoadGroup.h"
#include "nsNetUtil.h"
+#include "nsStringStream.h"
+#include "nsIAuthPrompt.h"
+#include "nsIAuthPrompt2.h"
+#include "nsIOutputStream.h"
+#include "nsISupportsPrimitives.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsStreamUtils.h"
#include "nsThreadUtils.h"
#include "nsIUploadChannel.h"
diff --git a/dom/base/test/csp/chrome.ini b/dom/base/test/csp/chrome.ini
deleted file mode 100644
index 75359e9464..0000000000
--- a/dom/base/test/csp/chrome.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-skip-if = buildapp == 'b2g'
-
-[test_csp_bug768029.html]
-[test_csp_bug773891.html]
diff --git a/dom/base/test/csp/file_CSP_web_manifest.html b/dom/base/test/csp/file_CSP_web_manifest.html
deleted file mode 100644
index 83223c24af..0000000000
--- a/dom/base/test/csp/file_CSP_web_manifest.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-Support Page for Web Manifest Tests
\ No newline at end of file
diff --git a/dom/base/test/csp/file_CSP_web_manifest_https.html b/dom/base/test/csp/file_CSP_web_manifest_https.html
deleted file mode 100644
index 37d6e3eace..0000000000
--- a/dom/base/test/csp/file_CSP_web_manifest_https.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-Support Page for Web Manifest Tests
\ No newline at end of file
diff --git a/dom/base/test/csp/file_bug836922_npolicies.html b/dom/base/test/csp/file_bug836922_npolicies.html
deleted file mode 100644
index 3be43948f2..0000000000
--- a/dom/base/test/csp/file_bug836922_npolicies.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dom/base/test/csp/file_bug886164.html b/dom/base/test/csp/file_bug886164.html
deleted file mode 100644
index f6d0b439c9..0000000000
--- a/dom/base/test/csp/file_bug886164.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dom/base/test/csp/file_bug886164_3.html b/dom/base/test/csp/file_bug886164_3.html
deleted file mode 100644
index 175a2ff041..0000000000
--- a/dom/base/test/csp/file_bug886164_3.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dom/base/test/csp/file_bug886164_4.html b/dom/base/test/csp/file_bug886164_4.html
deleted file mode 100644
index abf819441a..0000000000
--- a/dom/base/test/csp/file_bug886164_4.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dom/base/test/csp/file_csp_allow_https_schemes.html b/dom/base/test/csp/file_csp_allow_https_schemes.html
deleted file mode 100644
index 96dab5013a..0000000000
--- a/dom/base/test/csp/file_csp_allow_https_schemes.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- Bug 826805 - CSP: Allow http and https for scheme-less sources
-
-
- blocked
-
-
-
-
diff --git a/dom/base/test/csp/file_csp_bug768029.html b/dom/base/test/csp/file_csp_bug768029.html
deleted file mode 100644
index b2f1fe5bbc..0000000000
--- a/dom/base/test/csp/file_csp_bug768029.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- This is an app for testing
-
-
-
-
-
-
-
-
-
-
-
- Test for CSP applied to (simulated) app.
-
-
-
diff --git a/dom/base/test/csp/file_csp_bug773891.html b/dom/base/test/csp/file_csp_bug773891.html
deleted file mode 100644
index ae2ba8d2fe..0000000000
--- a/dom/base/test/csp/file_csp_bug773891.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- This is an app for csp testing
-
-
-
-
-
-
-
-
-
-
-
- Test for CSP applied to (simulated) app.
-
-
-
diff --git a/dom/base/test/csp/file_policyuri_regression_from_multipolicy.html^headers^ b/dom/base/test/csp/file_policyuri_regression_from_multipolicy.html^headers^
deleted file mode 100644
index b57a8447c6..0000000000
--- a/dom/base/test/csp/file_policyuri_regression_from_multipolicy.html^headers^
+++ /dev/null
@@ -1 +0,0 @@
-content-security-policy-report-only: policy-uri /tests/dom/base/test/csp/file_CSP_policyuri_regression_from_multipolicy_policy
diff --git a/dom/base/test/mixedcontentblocker/mochitest.ini b/dom/base/test/mixedcontentblocker/mochitest.ini
deleted file mode 100644
index c118cf462d..0000000000
--- a/dom/base/test/mixedcontentblocker/mochitest.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[DEFAULT]
-support-files =
- bug803225_test_mailto.html
- file_mixed_content_frameNavigation.html
- file_mixed_content_frameNavigation_blankTarget.html
- file_mixed_content_frameNavigation_grandchild.html
- file_mixed_content_frameNavigation_innermost.html
- file_mixed_content_frameNavigation_secure.html
- file_mixed_content_frameNavigation_secure_grandchild.html
- file_mixed_content_main.html
- file_mixed_content_main_bug803225.html
- file_mixed_content_main_bug803225_websocket_wsh.py
- file_mixed_content_server.sjs
-
-[test_mixed_content_blocker.html]
-skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED # Bug 1141029 Mulet parity with B2G Desktop for TC
-[test_mixed_content_blocker_bug803225.html]
-skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED # Bug 1141029 Mulet parity with B2G Desktop for TC
-[test_mixed_content_blocker_frameNavigation.html]
-skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED # Bug 1141029 Mulet parity with B2G Desktop for TC
diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini
index 820c4cfa4b..4b338d791c 100644
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -62,11 +62,6 @@ support-files =
eventsource_redirect.resource^headers^
eventsource_redirect_to.resource
eventsource_redirect_to.resource^headers^
- file_CrossSiteXHR_cache_server.sjs
- file_CrossSiteXHR_inner.html
- file_CrossSiteXHR_inner.jar
- file_CrossSiteXHR_inner_data.sjs
- file_CrossSiteXHR_server.sjs
file_XHRDocURI.text
file_XHRDocURI.text^headers^
file_XHRDocURI.xml
@@ -316,10 +311,6 @@ skip-if = e10s || buildapp == 'b2g'
[test_window_named_frame_enumeration.html]
[test_writable-replaceable.html]
[test_navigatorPrefOverride.html]
-[test_CrossSiteXHR.html]
-[test_CrossSiteXHR_cache.html]
-[test_CrossSiteXHR_origin.html]
-skip-if = buildapp == 'b2g' || e10s # last test fails to trigger onload on e10s/b2g
[test_EventSource_redirects.html]
[test_NodeIterator_basics_filters.xhtml]
[test_NodeIterator_mutations_1.xhtml]
diff --git a/dom/base/test/moz.build b/dom/base/test/moz.build
index e58a412273..9fdfe9ae43 100644
--- a/dom/base/test/moz.build
+++ b/dom/base/test/moz.build
@@ -10,7 +10,6 @@ XPCSHELL_TESTS_MANIFESTS += [
]
GeckoCppUnitTests([
- 'TestCSPParser',
'TestGetURL',
'TestNativeXMLHttpRequest',
'TestPlainTextSerializer',
@@ -18,8 +17,6 @@ GeckoCppUnitTests([
MOCHITEST_MANIFESTS += [
'chrome/mochitest.ini',
- 'csp/mochitest.ini',
- 'mixedcontentblocker/mochitest.ini',
'mochitest.ini',
'websocket_hybi/mochitest.ini',
]
@@ -34,10 +31,8 @@ if CONFIG['MOZ_CHILD_PERMISSIONS']:
MOCHITEST_CHROME_MANIFESTS += [
'chrome.ini',
'chrome/chrome.ini',
- 'csp/chrome.ini',
]
BROWSER_CHROME_MANIFESTS += [
'browser.ini',
- 'csp/browser.ini',
]
diff --git a/dom/base/test/test_warning_for_blocked_cross_site_request.html b/dom/base/test/test_warning_for_blocked_cross_site_request.html
index 50e470dfcd..590506d2ee 100644
--- a/dom/base/test/test_warning_for_blocked_cross_site_request.html
+++ b/dom/base/test/test_warning_for_blocked_cross_site_request.html
@@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=713980
@@ -76,7 +76,7 @@ function cleanup() {
// Send a cross-origin XHR request without CORS
var xhr = new XMLHttpRequest();
-xhr.open("GET", "http://example.org/tests/dom/base/test/file_CrossSiteXHR_server.sjs?allowOrigin=http://invalid", true);
+xhr.open("GET", "http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_server.sjs?allowOrigin=http://invalid", true);
xhr.send(null);
// Create a div that triggers a cross-origin webfont request
diff --git a/dom/base/test/unit/xpcshell.ini b/dom/base/test/unit/xpcshell.ini
index 309ac44830..287882e565 100644
--- a/dom/base/test/unit/xpcshell.ini
+++ b/dom/base/test/unit/xpcshell.ini
@@ -23,8 +23,6 @@ support-files =
[test_bug553888.js]
[test_bug737966.js]
-[test_cspreports.js]
-skip-if = buildapp == 'mulet'
[test_error_codes.js]
run-sequentially = Hardcoded 4444 port.
# Bug 1018414: hardcoded localhost doesn't work properly on some OS X installs
diff --git a/dom/cache/Cache.cpp b/dom/cache/Cache.cpp
index c5fcf1c85b..38d4d4ec6b 100644
--- a/dom/cache/Cache.cpp
+++ b/dom/cache/Cache.cpp
@@ -22,7 +22,6 @@
#include "mozilla/Preferences.h"
#include "mozilla/unused.h"
#include "nsIGlobalObject.h"
-#include "nsNetUtil.h"
namespace mozilla {
namespace dom {
diff --git a/dom/cache/DBAction.cpp b/dom/cache/DBAction.cpp
index 0aae9f2327..3120aea503 100644
--- a/dom/cache/DBAction.cpp
+++ b/dom/cache/DBAction.cpp
@@ -16,7 +16,7 @@
#include "mozStorageCID.h"
#include "nsIFile.h"
#include "nsIURI.h"
-#include "nsNetUtil.h"
+#include "nsIFileURL.h"
#include "nsThreadUtils.h"
namespace mozilla {
diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp
index f7a02a40c2..3769eced10 100644
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -19,6 +19,7 @@
#include "nsCRT.h"
#include "nsHttp.h"
#include "nsICryptoHash.h"
+#include "nsNetCID.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/dom/HeadersBinding.h"
#include "mozilla/dom/RequestBinding.h"
diff --git a/dom/cache/FileUtils.cpp b/dom/cache/FileUtils.cpp
index 77d8e8cdbc..965a7b99fe 100644
--- a/dom/cache/FileUtils.cpp
+++ b/dom/cache/FileUtils.cpp
@@ -11,7 +11,8 @@
#include "mozilla/unused.h"
#include "nsIFile.h"
#include "nsIUUIDGenerator.h"
-#include "nsNetUtil.h"
+#include "nsNetCID.h"
+#include "nsISimpleEnumerator.h"
#include "nsServiceManagerUtils.h"
#include "nsString.h"
#include "nsThreadUtils.h"
diff --git a/dom/camera/TestGonkCameraHardware.cpp b/dom/camera/TestGonkCameraHardware.cpp
index d3c79e907b..5a945b5e95 100644
--- a/dom/camera/TestGonkCameraHardware.cpp
+++ b/dom/camera/TestGonkCameraHardware.cpp
@@ -22,8 +22,8 @@
#include "mozilla/dom/ErrorEvent.h"
#include "mozilla/dom/CameraFacesDetectedEvent.h"
#include "mozilla/dom/CameraStateChangeEvent.h"
-#include "DOMCameraDetectedFace.h"
#include "nsNetUtil.h"
+#include "DOMCameraDetectedFace.h"
#include "nsServiceManagerUtils.h"
#include "nsICameraTestHardware.h"
diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp
index 4ef7f703bd..743282ab32 100644
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -37,6 +37,7 @@
#include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryServiceDefs.h"
#include "nsNetUtil.h"
+#include "nsIOutputStream.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIPrincipal.h"
#include "nsJSUtils.h"
diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp
index 8df69fbee5..2b772f0f02 100644
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -16,6 +16,8 @@
#include "nsIScriptSecurityManager.h"
#include "nsIThreadRetargetableRequest.h"
#include "nsIUploadChannel2.h"
+#include "nsIInterfaceRequestorUtils.h"
+#include "nsIPipe.h"
#include "nsContentPolicyUtils.h"
#include "nsCORSListenerProxy.h"
diff --git a/dom/filehandle/FileHandle.cpp b/dom/filehandle/FileHandle.cpp
index c1a8edd22f..87455e9860 100644
--- a/dom/filehandle/FileHandle.cpp
+++ b/dom/filehandle/FileHandle.cpp
@@ -21,6 +21,7 @@
#include "nsIEventTarget.h"
#include "nsISeekableStream.h"
#include "nsNetUtil.h"
+#include "nsIAsyncStreamCopier.h"
#include "nsString.h"
#include "nsStringStream.h"
#include "nsThreadUtils.h"
diff --git a/dom/filesystem/CreateFileTask.cpp b/dom/filesystem/CreateFileTask.cpp
index ece56f2f9d..042e6d66e8 100644
--- a/dom/filesystem/CreateFileTask.cpp
+++ b/dom/filesystem/CreateFileTask.cpp
@@ -18,6 +18,7 @@
#include "mozilla/dom/ipc/BlobParent.h"
#include "nsIFile.h"
#include "nsNetUtil.h"
+#include "nsIOutputStream.h"
#include "nsStringGlue.h"
namespace mozilla {
diff --git a/dom/filesystem/FileSystemTaskBase.cpp b/dom/filesystem/FileSystemTaskBase.cpp
index 8f52f6b239..83d9a5b265 100644
--- a/dom/filesystem/FileSystemTaskBase.cpp
+++ b/dom/filesystem/FileSystemTaskBase.cpp
@@ -6,7 +6,7 @@
#include "mozilla/dom/FileSystemTaskBase.h"
-#include "nsNetUtil.h" // Stream transport service.
+#include "nsNetCID.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/FileSystemBase.h"
diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp
index c8b045eb67..89a0bcef96 100644
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -43,6 +43,7 @@
#include "nsRange.h"
#include "nsIScriptSecurityManager.h"
#include "nsNetUtil.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsIWebProgress.h"
#include "nsIDocShell.h"
#include "nsFormData.h"
diff --git a/dom/html/HTMLImageElement.cpp b/dom/html/HTMLImageElement.cpp
index b59b80c065..4b80895ecb 100644
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -17,7 +17,6 @@
#include "nsIURL.h"
#include "nsIIOService.h"
#include "nsIServiceManager.h"
-#include "nsNetUtil.h"
#include "nsContentUtils.h"
#include "nsContainerFrame.h"
#include "nsNodeInfoManager.h"
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
index 24981a2f29..5c334eaeb0 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -77,6 +77,7 @@
// input type=file
#include "mozilla/dom/File.h"
#include "nsIFile.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsDirectoryServiceDefs.h"
#include "nsIContentPrefService.h"
diff --git a/dom/html/HTMLLinkElement.cpp b/dom/html/HTMLLinkElement.cpp
index d927b334cf..80856beb61 100644
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -24,7 +24,6 @@
#include "nsIStyleSheet.h"
#include "nsIStyleSheetLinkingElement.h"
#include "nsIURL.h"
-#include "nsNetUtil.h"
#include "nsPIDOMWindow.h"
#include "nsReadableUtils.h"
#include "nsStyleConsts.h"
diff --git a/dom/html/HTMLStyleElement.cpp b/dom/html/HTMLStyleElement.cpp
index 7f98bdb91c..4534aaa88d 100644
--- a/dom/html/HTMLStyleElement.cpp
+++ b/dom/html/HTMLStyleElement.cpp
@@ -9,7 +9,6 @@
#include "nsStyleConsts.h"
#include "nsIDOMStyleSheet.h"
#include "nsIStyleSheet.h"
-#include "nsNetUtil.h"
#include "nsIDocument.h"
#include "nsUnicharUtils.h"
#include "nsThreadUtils.h"
diff --git a/dom/html/HTMLVideoElement.cpp b/dom/html/HTMLVideoElement.cpp
index 407da37bf8..9b23adecb1 100644
--- a/dom/html/HTMLVideoElement.cpp
+++ b/dom/html/HTMLVideoElement.cpp
@@ -13,7 +13,6 @@
#include "nsError.h"
#include "nsNodeInfoManager.h"
#include "plbase64.h"
-#include "nsNetUtil.h"
#include "nsXPCOMStrings.h"
#include "prlock.h"
#include "nsThreadUtils.h"
diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp
index 4ea3070386..60acef1588 100644
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -37,7 +37,6 @@
#include "nsPIDOMWindow.h"
#include "nsIStyleRule.h"
#include "nsIURL.h"
-#include "nsNetUtil.h"
#include "nsEscape.h"
#include "nsIFrameInlines.h"
#include "nsIScrollableFrame.h"
diff --git a/dom/html/nsHTMLContentSink.cpp b/dom/html/nsHTMLContentSink.cpp
index 6ffb02108f..6e715508e3 100644
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -21,7 +21,6 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsScriptLoader.h"
#include "nsIURI.h"
-#include "nsNetUtil.h"
#include "nsIContentViewer.h"
#include "mozilla/dom/NodeInfo.h"
#include "nsToken.h"
diff --git a/dom/html/nsHTMLDNSPrefetch.cpp b/dom/html/nsHTMLDNSPrefetch.cpp
index 95f140e430..09d281b9be 100644
--- a/dom/html/nsHTMLDNSPrefetch.cpp
+++ b/dom/html/nsHTMLDNSPrefetch.cpp
@@ -14,6 +14,8 @@
#include "nsString.h"
#include "nsNetUtil.h"
+#include "nsNetCID.h"
+#include "nsIProtocolHandler.h"
#include "nsIDNSListener.h"
#include "nsIWebProgressListener.h"
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 6579131082..1a53cbcb03 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -31,6 +31,7 @@
#include "nsIURI.h"
#include "nsIIOService.h"
#include "nsNetUtil.h"
+#include "nsIPrivateBrowsingChannel.h"
#include "nsIContentViewerContainer.h"
#include "nsIContentViewer.h"
#include "nsDocShell.h"
diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
index 52f788070d..059df36e09 100644
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -60,6 +60,7 @@
#include "nsEscape.h"
#include "nsHashKeys.h"
#include "nsNetUtil.h"
+#include "nsISimpleEnumerator.h"
#include "nsIAppsService.h"
#include "nsIEventTarget.h"
#include "nsIFile.h"
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index 1949a98ac1..e645ef603e 100755
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -121,6 +121,7 @@
#include "nsIObserverService.h"
#include "nsIPresShell.h"
#include "nsIScriptError.h"
+#include "nsIScriptSecurityManager.h"
#include "nsISiteSecurityService.h"
#include "nsISpellChecker.h"
#include "nsIStyleSheet.h"
diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp
index d76198a4f9..7848c88441 100644
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -89,6 +89,7 @@
#include "gfxPrefs.h"
#include "nsILoginManagerPrompter.h"
#include "nsPIWindowRoot.h"
+#include "nsIAuthPrompt2.h"
#include "gfxDrawable.h"
#include "ImageOps.h"
#include "UnitTransforms.h"
diff --git a/dom/json/nsJSON.cpp b/dom/json/nsJSON.cpp
index 32f35fa83a..118ee51dac 100644
--- a/dom/json/nsJSON.cpp
+++ b/dom/json/nsJSON.cpp
@@ -17,6 +17,8 @@
#include "nsIUnicodeDecoder.h"
#include "nsXPCOMStrings.h"
#include "nsNetUtil.h"
+#include "nsIURI.h"
+#include "nsComponentManagerUtils.h"
#include "nsContentUtils.h"
#include "nsIScriptError.h"
#include "nsCRTGlue.h"
diff --git a/dom/jsurl/nsJSProtocolHandler.cpp b/dom/jsurl/nsJSProtocolHandler.cpp
index 75a41e7f87..82417dcb9c 100644
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -16,6 +16,7 @@
#include "nsStringStream.h"
#include "nsNetUtil.h"
+#include "nsIStreamListener.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIURI.h"
diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp
index ee015df306..5189d23093 100644
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -24,6 +24,7 @@
#include "nsISupportsPrimitives.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIIDNService.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsPrincipal.h"
#include "nsICryptoHash.h"
diff --git a/dom/media/systemservices/LoadManager.cpp b/dom/media/systemservices/LoadManager.cpp
index cbafae34dd..5d5a1ce02b 100644
--- a/dom/media/systemservices/LoadManager.cpp
+++ b/dom/media/systemservices/LoadManager.cpp
@@ -14,7 +14,6 @@
#include "nsString.h"
#include "nsThreadUtils.h"
#include "nsReadableUtils.h"
-#include "nsNetUtil.h"
#include "nsIObserverService.h"
// NSPR_LOG_MODULES=LoadManager:5
diff --git a/dom/media/systemservices/LoadMonitor.cpp b/dom/media/systemservices/LoadMonitor.cpp
index d5ba1174b7..f18cdf9153 100644
--- a/dom/media/systemservices/LoadMonitor.cpp
+++ b/dom/media/systemservices/LoadMonitor.cpp
@@ -16,6 +16,8 @@
#include "nsThreadUtils.h"
#include "nsReadableUtils.h"
#include "nsNetUtil.h"
+#include "nsIInputStream.h"
+#include "nsIFile.h"
#include "nsILineInputStream.h"
#include "nsIObserverService.h"
#include "nsIServiceManager.h"
diff --git a/dom/media/systemservices/MediaParent.cpp b/dom/media/systemservices/MediaParent.cpp
index a48252fb15..06c2a90c05 100644
--- a/dom/media/systemservices/MediaParent.cpp
+++ b/dom/media/systemservices/MediaParent.cpp
@@ -13,8 +13,11 @@
#include "MediaEngine.h"
#include "VideoUtils.h"
#include "nsThreadUtils.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
+#include "nsIOutputStream.h"
#include "nsILineInputStream.h"
+#include "nsISafeOutputStream.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsISupportsImpl.h"
#include "mozilla/Logging.h"
diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp
index ae99809ccd..2288f6c511 100644
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -35,6 +35,7 @@
#include "PeriodicWave.h"
#include "ConvolverNode.h"
#include "OscillatorNode.h"
+#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "AudioStream.h"
#include "mozilla/dom/Promise.h"
diff --git a/dom/network/TCPServerSocketParent.cpp b/dom/network/TCPServerSocketParent.cpp
index d465e58d0d..a3ac6a1447 100644
--- a/dom/network/TCPServerSocketParent.cpp
+++ b/dom/network/TCPServerSocketParent.cpp
@@ -4,6 +4,7 @@
* 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/. */
+#include "nsIScriptSecurityManager.h"
#include "TCPServerSocketParent.h"
#include "nsJSUtils.h"
#include "TCPSocketParent.h"
diff --git a/dom/network/TCPSocketParent.cpp b/dom/network/TCPSocketParent.cpp
index d3cf7a5a24..a238bdb631 100644
--- a/dom/network/TCPSocketParent.cpp
+++ b/dom/network/TCPSocketParent.cpp
@@ -18,6 +18,7 @@
#include "mozilla/dom/TabParent.h"
#include "mozilla/HoldDropJSObjects.h"
#include "nsIScriptSecurityManager.h"
+#include "nsNetUtil.h"
namespace IPC {
diff --git a/dom/offline/nsDOMOfflineResourceList.cpp b/dom/offline/nsDOMOfflineResourceList.cpp
index 558315d6d5..2bcf93a797 100644
--- a/dom/offline/nsDOMOfflineResourceList.cpp
+++ b/dom/offline/nsDOMOfflineResourceList.cpp
@@ -13,6 +13,8 @@
#include "nsCPrefetchService.h"
#include "nsNetUtil.h"
#include "nsNetCID.h"
+#include "nsServiceManagerUtils.h"
+#include "nsIInterfaceRequestorUtils.h"
#include "nsIOfflineCacheUpdate.h"
#include "nsAutoPtr.h"
#include "nsContentUtils.h"
diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp
index 51e1b0760d..5f0319ec5f 100644
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -72,6 +72,7 @@
#include "nsIDocShell.h"
#include "nsNetUtil.h"
+#include "nsNetCID.h"
#include "mozilla/Mutex.h"
#include "mozilla/PluginLibrary.h"
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
index 252f611cc8..518c8d0e85 100644
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -38,6 +38,9 @@
#endif
#include "nsISeekableStream.h"
#include "nsNetUtil.h"
+#include "nsIFileStreams.h"
+#include "nsISimpleEnumerator.h"
+#include "nsIStringStream.h"
#include "nsIProgressEventSink.h"
#include "nsIDocument.h"
#include "nsPluginLogging.h"
diff --git a/dom/security/moz.build b/dom/security/moz.build
index b994949b79..5b31185583 100644
--- a/dom/security/moz.build
+++ b/dom/security/moz.build
@@ -4,6 +4,8 @@
# 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/.
+TEST_DIRS += ['test']
+
EXPORTS.mozilla.dom += [
'nsCSPContext.h',
'nsCSPService.h',
diff --git a/dom/security/nsCORSListenerProxy.cpp b/dom/security/nsCORSListenerProxy.cpp
index 5da91b8bb9..fc8fa90db1 100644
--- a/dom/security/nsCORSListenerProxy.cpp
+++ b/dom/security/nsCORSListenerProxy.cpp
@@ -15,6 +15,8 @@
#include "nsContentUtils.h"
#include "nsIScriptSecurityManager.h"
#include "nsNetUtil.h"
+#include "nsIInterfaceRequestorUtils.h"
+#include "nsServiceManagerUtils.h"
#include "nsMimeTypes.h"
#include "nsIStreamConverterService.h"
#include "nsStringStream.h"
diff --git a/dom/security/nsCSPContext.h b/dom/security/nsCSPContext.h
index 61ca58aa43..e1d4c7b90c 100644
--- a/dom/security/nsCSPContext.h
+++ b/dom/security/nsCSPContext.h
@@ -16,7 +16,7 @@
#include "nsIInterfaceRequestor.h"
#include "nsISerializable.h"
#include "nsIStreamListener.h"
-#include "nsWeakPtr.h"
+#include "nsWeakReference.h"
#include "nsXPCOM.h"
#define NS_CSPCONTEXT_CONTRACTID "@mozilla.org/cspcontext;1"
diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp
index bc06ae1346..595a990e28 100644
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -11,7 +11,7 @@
#include "nsIScriptError.h"
#include "nsIServiceManager.h"
#include "nsIStringBundle.h"
-#include "nsNetUtil.h"
+#include "nsIURL.h"
#include "nsReadableUtils.h"
#define DEFAULT_PORT -1
diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp
index 8ecc392c5d..9b886c0ea3 100644
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -14,7 +14,6 @@
#include "nsISecurityEventSink.h"
#include "nsIWebProgressListener.h"
#include "nsContentUtils.h"
-#include "nsNetUtil.h"
#include "nsIRequest.h"
#include "nsIDocument.h"
#include "nsIContentViewer.h"
diff --git a/dom/base/test/TestCSPParser.cpp b/dom/security/test/TestCSPParser.cpp
similarity index 100%
rename from dom/base/test/TestCSPParser.cpp
rename to dom/security/test/TestCSPParser.cpp
diff --git a/dom/base/test/file_CrossSiteXHR_cache_server.sjs b/dom/security/test/cors/file_CrossSiteXHR_cache_server.sjs
similarity index 89%
rename from dom/base/test/file_CrossSiteXHR_cache_server.sjs
rename to dom/security/test/cors/file_CrossSiteXHR_cache_server.sjs
index 5da6bf663e..f56f512e15 100644
--- a/dom/base/test/file_CrossSiteXHR_cache_server.sjs
+++ b/dom/security/test/cors/file_CrossSiteXHR_cache_server.sjs
@@ -7,7 +7,7 @@ function handleRequest(request, response)
});
if ("setState" in query) {
- setState("test/dom/base/test_CrossSiteXHR_cache:secData",
+ setState("test/dom/security/test_CrossSiteXHR_cache:secData",
query.setState);
response.setHeader("Cache-Control", "no-cache", false);
@@ -22,7 +22,7 @@ function handleRequest(request, response)
// Send response
secData =
- eval(getState("test/dom/base/test_CrossSiteXHR_cache:secData"));
+ eval(getState("test/dom/security/test_CrossSiteXHR_cache:secData"));
if (secData.allowOrigin)
response.setHeader("Access-Control-Allow-Origin", secData.allowOrigin);
diff --git a/dom/base/test/file_CrossSiteXHR_inner.html b/dom/security/test/cors/file_CrossSiteXHR_inner.html
similarity index 100%
rename from dom/base/test/file_CrossSiteXHR_inner.html
rename to dom/security/test/cors/file_CrossSiteXHR_inner.html
diff --git a/dom/base/test/file_CrossSiteXHR_inner.jar b/dom/security/test/cors/file_CrossSiteXHR_inner.jar
similarity index 100%
rename from dom/base/test/file_CrossSiteXHR_inner.jar
rename to dom/security/test/cors/file_CrossSiteXHR_inner.jar
diff --git a/dom/base/test/file_CrossSiteXHR_inner_data.sjs b/dom/security/test/cors/file_CrossSiteXHR_inner_data.sjs
similarity index 100%
rename from dom/base/test/file_CrossSiteXHR_inner_data.sjs
rename to dom/security/test/cors/file_CrossSiteXHR_inner_data.sjs
diff --git a/dom/base/test/file_CrossSiteXHR_server.sjs b/dom/security/test/cors/file_CrossSiteXHR_server.sjs
similarity index 98%
rename from dom/base/test/file_CrossSiteXHR_server.sjs
rename to dom/security/test/cors/file_CrossSiteXHR_server.sjs
index cbf042040e..a2b7cafb33 100644
--- a/dom/base/test/file_CrossSiteXHR_server.sjs
+++ b/dom/security/test/cors/file_CrossSiteXHR_server.sjs
@@ -138,7 +138,7 @@ function handleRequest(request, response)
if (query.hop && query.hop < hops.length) {
newURL = hops[query.hop].server +
- "/tests/dom/base/test/file_CrossSiteXHR_server.sjs?" +
+ "/tests/dom/security/test/cors/file_CrossSiteXHR_server.sjs?" +
"hop=" + (query.hop + 1) + "&hops=" + query.hops;
response.setStatusLine(null, 307, "redirect");
response.setHeader("Location", newURL);
diff --git a/dom/security/test/cors/mochitest.ini b/dom/security/test/cors/mochitest.ini
new file mode 100644
index 0000000000..0dbba8be52
--- /dev/null
+++ b/dom/security/test/cors/mochitest.ini
@@ -0,0 +1,12 @@
+[DEFAULT]
+support-files =
+ file_CrossSiteXHR_cache_server.sjs
+ file_CrossSiteXHR_inner.html
+ file_CrossSiteXHR_inner.jar
+ file_CrossSiteXHR_inner_data.sjs
+ file_CrossSiteXHR_server.sjs
+
+[test_CrossSiteXHR.html]
+[test_CrossSiteXHR_cache.html]
+[test_CrossSiteXHR_origin.html]
+skip-if = buildapp == 'b2g' || e10s # last test fails to trigger onload on e10s/b2g
diff --git a/dom/base/test/test_CrossSiteXHR.html b/dom/security/test/cors/test_CrossSiteXHR.html
similarity index 99%
rename from dom/base/test/test_CrossSiteXHR.html
rename to dom/security/test/cors/test_CrossSiteXHR.html
index d80d078f98..fe7bfcfbe6 100644
--- a/dom/base/test/test_CrossSiteXHR.html
+++ b/dom/security/test/cors/test_CrossSiteXHR.html
@@ -44,11 +44,11 @@ function runTest() {
loader.onload = function () { gen.next() };
// Test preflight-less requests
- basePath = "/tests/dom/base/test/file_CrossSiteXHR_server.sjs?"
+ basePath = "/tests/dom/security/test/cors/file_CrossSiteXHR_server.sjs?"
baseURL = "http://mochi.test:8888" + basePath;
// Test preflighted requests
- loader.src = "http://example.org/tests/dom/base/test/file_CrossSiteXHR_inner.html";
+ loader.src = "http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_inner.html";
origin = "http://example.org";
yield undefined;
@@ -874,7 +874,7 @@ function runTest() {
// Test redirects
- is(loader.src, "http://example.org/tests/dom/base/test/file_CrossSiteXHR_inner.html");
+ is(loader.src, "http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_inner.html");
is(origin, "http://example.org");
tests = [{ pass: 1,
diff --git a/dom/base/test/test_CrossSiteXHR_cache.html b/dom/security/test/cors/test_CrossSiteXHR_cache.html
similarity index 98%
rename from dom/base/test/test_CrossSiteXHR_cache.html
rename to dom/security/test/cors/test_CrossSiteXHR_cache.html
index 77371044f3..bcd74b9d90 100644
--- a/dom/base/test/test_CrossSiteXHR_cache.html
+++ b/dom/security/test/cors/test_CrossSiteXHR_cache.html
@@ -30,7 +30,7 @@ function runTest() {
var loaderWindow = loader.contentWindow;
loader.onload = function () { gen.next() };
- loader.src = "http://example.org/tests/dom/base/test/file_CrossSiteXHR_inner.html";
+ loader.src = "http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_inner.html";
origin = "http://example.org";
yield undefined;
@@ -428,7 +428,7 @@ function runTest() {
});
}
- baseURL = "http://mochi.test:8888/tests/dom/base/test/" +
+ baseURL = "http://mochi.test:8888/tests/dom/security/test/cors/" +
"file_CrossSiteXHR_cache_server.sjs?";
setStateURL = baseURL + "setState=";
diff --git a/dom/base/test/test_CrossSiteXHR_origin.html b/dom/security/test/cors/test_CrossSiteXHR_origin.html
similarity index 92%
rename from dom/base/test/test_CrossSiteXHR_origin.html
rename to dom/security/test/cors/test_CrossSiteXHR_origin.html
index 09fd81502b..95fe7f21c4 100644
--- a/dom/base/test/test_CrossSiteXHR_origin.html
+++ b/dom/security/test/cors/test_CrossSiteXHR_origin.html
@@ -39,10 +39,10 @@ var origins =
origin: 'http://xn--hxajbheg2az3al.xn--jxalpdlp'
},
{ origin: 'http://example.org',
- file: 'jar:http://example.org/tests/dom/base/test/file_CrossSiteXHR_inner.jar!/file_CrossSiteXHR_inner.html'
+ file: 'jar:http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_inner.jar!/file_CrossSiteXHR_inner.html'
},
{ origin: 'null',
- file: 'http://example.org/tests/dom/base/test/file_CrossSiteXHR_inner_data.sjs'
+ file: 'http://example.org/tests/dom/security/test/cors/file_CrossSiteXHR_inner_data.sjs'
},
];
@@ -61,14 +61,14 @@ function runTest() {
loader.onload = function () { gen.next() };
// Test preflight-less requests
- basePath = "/tests/dom/base/test/file_CrossSiteXHR_server.sjs?"
+ basePath = "/tests/dom/security/test/cors/file_CrossSiteXHR_server.sjs?"
baseURL = "http://mochi.test:8888" + basePath;
for (originEntry of origins) {
origin = originEntry.origin || originEntry.server;
loader.src = originEntry.file ||
- (originEntry.server + "/tests/dom/base/test/file_CrossSiteXHR_inner.html");
+ (originEntry.server + "/tests/dom/security/test/cors/file_CrossSiteXHR_inner.html");
yield undefined;
var isNullOrigin = origin == "null";
diff --git a/dom/base/test/csp/browser.ini b/dom/security/test/csp/browser.ini
similarity index 100%
rename from dom/base/test/csp/browser.ini
rename to dom/security/test/csp/browser.ini
diff --git a/dom/base/test/csp/browser_test_web_manifest.js b/dom/security/test/csp/browser_test_web_manifest.js
similarity index 95%
rename from dom/base/test/csp/browser_test_web_manifest.js
rename to dom/security/test/csp/browser_test_web_manifest.js
index ca12d60ad8..118f6fa28f 100644
--- a/dom/base/test/csp/browser_test_web_manifest.js
+++ b/dom/security/test/csp/browser_test_web_manifest.js
@@ -11,12 +11,12 @@ requestLongerTimeout(10); // e10s tests take time.
const {
ManifestObtainer
} = Components.utils.import('resource://gre/modules/WebManifest.jsm', {});
-const path = '/tests/dom/base/test/csp/';
-const testFile = `file=${path}file_CSP_web_manifest.html`;
-const remoteFile = `file=${path}file_CSP_web_manifest_remote.html`;
-const httpsManifest = `file=${path}file_CSP_web_manifest_https.html`;
-const mixedContent = `file=${path}file_CSP_web_manifest_mixed_content.html`;
-const server = 'file_csp_testserver.sjs';
+const path = '/tests/dom/security/test/csp/';
+const testFile = `file=${path}file_web_manifest.html`;
+const remoteFile = `file=${path}file_web_manifest_remote.html`;
+const httpsManifest = `file=${path}file_web_manifest_https.html`;
+const mixedContent = `file=${path}file_web_manifest_mixed_content.html`;
+const server = 'file_testserver.sjs';
const defaultURL = `http://example.org${path}${server}`;
const remoteURL = `http://mochi.test:8888`;
const secureURL = `https://example.com${path}${server}`;
diff --git a/dom/base/test/csp/browser_test_web_manifest_mixed_content.js b/dom/security/test/csp/browser_test_web_manifest_mixed_content.js
similarity index 83%
rename from dom/base/test/csp/browser_test_web_manifest_mixed_content.js
rename to dom/security/test/csp/browser_test_web_manifest_mixed_content.js
index c4f3b738b1..b7d1b7b688 100644
--- a/dom/base/test/csp/browser_test_web_manifest_mixed_content.js
+++ b/dom/security/test/csp/browser_test_web_manifest_mixed_content.js
@@ -7,12 +7,12 @@
const {
ManifestObtainer
} = Components.utils.import('resource://gre/modules/WebManifest.jsm', {});
-const path = '/tests/dom/base/test/csp/';
-const mixedContent = `file=${path}file_CSP_web_manifest_mixed_content.html`;
-const server = 'file_csp_testserver.sjs';
+const path = '/tests/dom/security/test/csp/';
+const mixedContent = `file=${path}file_web_manifest_mixed_content.html`;
+const server = 'file_testserver.sjs';
const secureURL = `https://example.com${path}${server}`;
const tests = [
- // Trying to load mixed content in file_CSP_web_manifest_mixed_content.html
+ // Trying to load mixed content in file_web_manifest_mixed_content.html
// needs to result in an error.
{
expected: `Mixed Content Blocker prevents fetching manifest.`,
diff --git a/dom/security/test/csp/chrome.ini b/dom/security/test/csp/chrome.ini
new file mode 100644
index 0000000000..92862ebd6b
--- /dev/null
+++ b/dom/security/test/csp/chrome.ini
@@ -0,0 +1,5 @@
+[DEFAULT]
+skip-if = buildapp == 'b2g'
+
+[test_bug768029.html]
+[test_bug773891.html]
diff --git a/dom/base/test/csp/file_CSP.css b/dom/security/test/csp/file_CSP.css
similarity index 82%
rename from dom/base/test/csp/file_CSP.css
rename to dom/security/test/csp/file_CSP.css
index 35fcd6f5fd..6835c4d4ad 100644
--- a/dom/base/test/csp/file_CSP.css
+++ b/dom/security/test/csp/file_CSP.css
@@ -12,7 +12,7 @@
}
@font-face {
font-family: "arbitrary_bad";
- src: url('http://example.org/tests/dom/base/test/csp/file_CSP.sjs?testid=font_bad&type=application/octet-stream');
+ src: url('http://example.org/tests/dom/security/test/csp/file_CSP.sjs?testid=font_bad&type=application/octet-stream');
}
.div_arbitrary_good { font-family: "arbitrary_good"; }
diff --git a/dom/base/test/csp/file_CSP.sjs b/dom/security/test/csp/file_CSP.sjs
similarity index 100%
rename from dom/base/test/csp/file_CSP.sjs
rename to dom/security/test/csp/file_CSP.sjs
diff --git a/dom/security/test/csp/file_allow_https_schemes.html b/dom/security/test/csp/file_allow_https_schemes.html
new file mode 100644
index 0000000000..787e683e87
--- /dev/null
+++ b/dom/security/test/csp/file_allow_https_schemes.html
@@ -0,0 +1,14 @@
+
+
+
+ Bug 826805 - CSP: Allow http and https for scheme-less sources
+
+
+ blocked
+
+
+
+
diff --git a/dom/base/test/csp/file_base-uri.html b/dom/security/test/csp/file_base-uri.html
similarity index 100%
rename from dom/base/test/csp/file_base-uri.html
rename to dom/security/test/csp/file_base-uri.html
diff --git a/dom/security/test/csp/file_blob_data_schemes.html b/dom/security/test/csp/file_blob_data_schemes.html
new file mode 100644
index 0000000000..0a4a491606
--- /dev/null
+++ b/dom/security/test/csp/file_blob_data_schemes.html
@@ -0,0 +1,49 @@
+
+
+
+ Bug 1086999 - Wildcard should not match blob:, data:
+
+
+
+
+
diff --git a/dom/base/test/csp/file_CSP_bug663567.xsl b/dom/security/test/csp/file_bug663567.xsl
similarity index 100%
rename from dom/base/test/csp/file_CSP_bug663567.xsl
rename to dom/security/test/csp/file_bug663567.xsl
diff --git a/dom/base/test/csp/file_CSP_bug663567_allows.xml b/dom/security/test/csp/file_bug663567_allows.xml
similarity index 86%
rename from dom/base/test/csp/file_CSP_bug663567_allows.xml
rename to dom/security/test/csp/file_bug663567_allows.xml
index 8abeb47127..93d3451038 100644
--- a/dom/base/test/csp/file_CSP_bug663567_allows.xml
+++ b/dom/security/test/csp/file_bug663567_allows.xml
@@ -1,5 +1,5 @@
-
+
Empire Burlesque
diff --git a/dom/base/test/csp/file_CSP_bug663567_allows.xml^headers^ b/dom/security/test/csp/file_bug663567_allows.xml^headers^
similarity index 100%
rename from dom/base/test/csp/file_CSP_bug663567_allows.xml^headers^
rename to dom/security/test/csp/file_bug663567_allows.xml^headers^
diff --git a/dom/base/test/csp/file_CSP_bug663567_blocks.xml b/dom/security/test/csp/file_bug663567_blocks.xml
similarity index 86%
rename from dom/base/test/csp/file_CSP_bug663567_blocks.xml
rename to dom/security/test/csp/file_bug663567_blocks.xml
index 8abeb47127..93d3451038 100644
--- a/dom/base/test/csp/file_CSP_bug663567_blocks.xml
+++ b/dom/security/test/csp/file_bug663567_blocks.xml
@@ -1,5 +1,5 @@
-
+
Empire Burlesque
diff --git a/dom/base/test/csp/file_CSP_bug663567_blocks.xml^headers^ b/dom/security/test/csp/file_bug663567_blocks.xml^headers^
similarity index 100%
rename from dom/base/test/csp/file_CSP_bug663567_blocks.xml^headers^
rename to dom/security/test/csp/file_bug663567_blocks.xml^headers^
diff --git a/dom/security/test/csp/file_bug768029.html b/dom/security/test/csp/file_bug768029.html
new file mode 100644
index 0000000000..b349d73ee1
--- /dev/null
+++ b/dom/security/test/csp/file_bug768029.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+ This is an app for testing
+
+
+
+
+
+
+
+
+
+
+
+ Test for CSP applied to (simulated) app.
+
+
+
diff --git a/dom/base/test/csp/file_csp_bug768029.sjs b/dom/security/test/csp/file_bug768029.sjs
similarity index 100%
rename from dom/base/test/csp/file_csp_bug768029.sjs
rename to dom/security/test/csp/file_bug768029.sjs
diff --git a/dom/security/test/csp/file_bug773891.html b/dom/security/test/csp/file_bug773891.html
new file mode 100644
index 0000000000..748169a20e
--- /dev/null
+++ b/dom/security/test/csp/file_bug773891.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+ This is an app for csp testing
+
+
+
+
+
+
+
+
+
+
+
+ Test for CSP applied to (simulated) app.
+
+
+
diff --git a/dom/base/test/csp/file_csp_bug773891.sjs b/dom/security/test/csp/file_bug773891.sjs
similarity index 100%
rename from dom/base/test/csp/file_csp_bug773891.sjs
rename to dom/security/test/csp/file_bug773891.sjs
diff --git a/dom/base/test/csp/file_CSP_bug802872.html b/dom/security/test/csp/file_bug802872.html
similarity index 83%
rename from dom/base/test/csp/file_CSP_bug802872.html
rename to dom/security/test/csp/file_bug802872.html
index a163adcc48..dc7129b0cf 100644
--- a/dom/base/test/csp/file_CSP_bug802872.html
+++ b/dom/security/test/csp/file_bug802872.html
@@ -7,6 +7,6 @@
-
+