Backed out changeset c970fb57fedd (bug 1247459) for failing its own test on Windows. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 31 May 2016 08:36:02 +0200
changeset 338642 8b0c9204fec755257cdecd21e4c10423adb769af
parent 338641 7a5ff0cdea30f55b0972659ce300a3179633dc80
child 338643 864cdd00360cdf62ea5132a457ee53a17f9e31aa
child 338677 65f18c79794bad38e16519fa97e39a2483c7fab5
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1247459
milestone49.0a1
backs outc970fb57fedd4da27872c5139e09a6a1ce80e3e0
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset c970fb57fedd (bug 1247459) for failing its own test on Windows. r=backout
devtools/client/webconsole/test/browser.ini
devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js
devtools/client/webconsole/test/test_bug_1247459_violation.html
dom/security/nsCSPUtils.cpp
--- a/devtools/client/webconsole/test/browser.ini
+++ b/devtools/client/webconsole/test/browser.ini
@@ -136,17 +136,16 @@ support-files =
   test-exception-stackframe.html
   test_bug_1010953_cspro.html^headers^
   test_bug_1010953_cspro.html
   test_bug1045902_console_csp_ignore_reflected_xss_message.html^headers^
   test_bug1045902_console_csp_ignore_reflected_xss_message.html
   test_bug1092055_shouldwarn.js^headers^
   test_bug1092055_shouldwarn.js
   test_bug1092055_shouldwarn.html
-  test_bug_1247459_violation.html
   !/devtools/client/framework/test/shared-head.js
   !/devtools/client/netmonitor/test/sjs_cors-test-server.sjs
   !/image/test/mochitest/blue.png
 
 [browser_bug1045902_console_csp_ignore_reflected_xss_message.js]
 skip-if = (e10s && debug) || (e10s && os == 'win') # Bug 1221499 enabled these on windows
 [browser_bug664688_sandbox_update_after_navigation.js]
 [browser_bug_638949_copy_link_location.js]
@@ -291,17 +290,16 @@ skip-if = e10s && (os == 'win' || os == 
 skip-if = os != "mac"
 [browser_webconsole_bug_817834_add_edited_input_to_history.js]
 [browser_webconsole_bug_837351_securityerrors.js]
 [browser_webconsole_filter_buttons_contextmenu.js]
 [browser_webconsole_bug_1006027_message_timestamps_incorrect.js]
 skip-if = e10s # Bug 1042253 - webconsole e10s tests (Linux debug intermittent)
 [browser_webconsole_bug_1010953_cspro.js]
 skip-if = e10s && (os == 'win' || os == 'mac') # Bug 1243967
-[browser_webconsole_bug_1247459_violation.js]
 [browser_webconsole_certificate_messages.js]
 skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_webconsole_show_subresource_security_errors.js]
 skip-if = e10s && (os == 'win' || os == 'mac') # Bug 1243987
 [browser_webconsole_cached_autocomplete.js]
 [browser_webconsole_change_font_size.js]
 [browser_webconsole_chrome.js]
 [browser_webconsole_clickable_urls.js]
deleted file mode 100644
--- a/devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that the Web Console CSP messages for two META policies
-// are correctly displayed.
-
-"use strict";
-
-const TEST_URI = "data:text/html;charset=utf8,Web Console CSP violation test";
-const TEST_VIOLATION = "https://example.com/browser/devtools/client/" +
-                       "webconsole/test/test_bug_1247459_violation.html";
-const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings " +
-                          "blocked the loading of a resource at " +
-                          "http://some.example.com/test.png (\u201cimg-src " +
-                          "https://example.com\u201d).";
-
-add_task(function* () {
-  let { browser } = yield loadTab(TEST_URI);
-
-  let hud = yield openConsole();
-
-  hud.jsterm.clearOutput();
-
-  let loaded = loadBrowser(browser);
-  content.location = TEST_VIOLATION;
-  yield loaded;
-
-  yield waitForMessages({
-    webconsole: hud,
-    messages: [
-      {
-        name: "CSP policy URI warning displayed successfully",
-        text: CSP_VIOLATION_MSG,
-        repeats: 2
-      }
-    ]
-  });
-});
deleted file mode 100644
--- a/devtools/client/webconsole/test/test_bug_1247459_violation.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta http-equiv="Content-Security-Policy" content="img-src https://example.com"></meta>
-  <meta http-equiv="Content-Security-Policy" content="img-src https://example.com"></meta>
-  <meta charset="UTF-8">
-  <title>Test for Bug 1247459 - policy violations for header and META are displayed separately</title>
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1247459">Mozilla Bug 1247459</a>
-<img src="http://some.example.com/test.png">
-</body>
-</html>
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -1113,17 +1113,16 @@ nsCSPPolicy::permits(CSPDirective aDir,
   if (CSPUTILSLOGENABLED()) {
     nsAutoCString spec;
     aUri->GetSpec(spec);
     CSPUTILSLOG(("nsCSPPolicy::permits, aUri: %s, aDir: %d, aSpecific: %s",
                  spec.get(), aDir, aSpecific ? "true" : "false"));
   }
 
   NS_ASSERTION(aUri, "permits needs an uri to perform the check!");
-  outViolatedDirective.Truncate();
 
   nsCSPDirective* defaultDir = nullptr;
 
   // Try to find a relevant directive
   // These directive arrays are short (1-5 elements), not worth using a hashtable.
   for (uint32_t i = 0; i < mDirectives.Length(); i++) {
     if (mDirectives[i]->equals(aDir)) {
       if (!mDirectives[i]->permits(aUri, aNonce, aWasRedirected, mReportOnly, mUpgradeInsecDir)) {