Merge mozilla-inbound to mozilla-central. a=merge
authorDorel Luca <dluca@mozilla.com>
Tue, 03 Apr 2018 07:04:18 +0300
changeset 411403 d75d996016dcf325c2db2ed8a47af512d07ffacd
parent 411402 720ffa73f567809363331c3331bf82b2f1af3c68 (current diff)
parent 411379 77e268b40ed67108c24f9df1f14e70e7f3f4af9a (diff)
child 411404 ac667545d8aaa2174674d683ebb494444f5b9821
child 411428 d0ae155862180c2655c0c84e1c5421d586cda67d
push id101643
push userdluca@mozilla.com
push dateTue, 03 Apr 2018 04:25:27 +0000
treeherdermozilla-inbound@ac667545d8aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone61.0a1
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
Merge mozilla-inbound to mozilla-central. a=merge
gfx/ycbcr/clang-cl-workaround.patch
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-000.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-001.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-002.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-003.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-004.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-005.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-012.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-013.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-014.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-015.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-016.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-017.html.ini
testing/web-platform/meta/css/css-shapes/shape-outside/shape-image/shape-image-025.html.ini
testing/web-platform/meta/css/css-shapes/spec-examples/shape-outside-010.html.ini
testing/web-platform/meta/css/css-shapes/spec-examples/shape-outside-011.html.ini
testing/web-platform/meta/css/css-shapes/spec-examples/shape-outside-012.html.ini
--- a/browser/modules/BrowserErrorReporter.jsm
+++ b/browser/modules/BrowserErrorReporter.jsm
@@ -54,16 +54,23 @@ const PLATFORM_NAMES = {
 
 // Filename URI regexes that we are okay with reporting to Telemetry. URIs not
 // matching these patterns may contain local file paths.
 const TELEMETRY_REPORTED_PATTERNS = new Set([
   /^resource:\/\/(?:\/|gre)/,
   /^chrome:\/\/(?:global|browser|devtools)/,
 ]);
 
+// Mapping of regexes to sample rates; if the regex matches the module an error
+// is thrown from, the matching sample rate is used instead of the default.
+// In case of a conflict, the first matching rate by insertion order is used.
+const MODULE_SAMPLE_RATES = new Map([
+  [/^(?:chrome|resource):\/\/devtools/, 1],
+]);
+
 /**
  * Collects nsIScriptError messages logged to the browser console and reports
  * them to a remotely-hosted error collection service.
  *
  * This is a PROTOTYPE; it will be removed in the future and potentially
  * replaced with a more robust implementation. It is meant to only collect
  * errors from Nightly (and local builds if enabled for development purposes)
  * and has not been reviewed for use outside of Nightly.
@@ -207,17 +214,23 @@ class BrowserErrorReporter {
       let filename = "FILTERED";
       if (this.shouldReportFilename(message.sourceName)) {
         filename = message.sourceName;
       }
       Services.telemetry.keyedScalarAdd(TELEMETRY_ERROR_COLLECTED_FILENAME, filename.slice(0, 69), 1);
     }
 
     // Sample the amount of errors we send out
-    const sampleRate = Number.parseFloat(this.sampleRatePref);
+    let sampleRate = Number.parseFloat(this.sampleRatePref);
+    for (const [regex, rate] of MODULE_SAMPLE_RATES) {
+      if (message.sourceName.match(regex)) {
+        sampleRate = rate;
+        break;
+      }
+    }
     if (!Number.isFinite(sampleRate) || (Math.random() >= sampleRate)) {
       return;
     }
 
     const exceptionValue = {};
     const requestBody = {
       ...this.requestBodyTemplate,
       timestamp: new Date().toISOString().slice(0, -1), // Remove trailing "Z"
--- a/browser/modules/test/browser/browser_BrowserErrorReporter.js
+++ b/browser/modules/test/browser/browser_BrowserErrorReporter.js
@@ -22,17 +22,17 @@ const TELEMETRY_ERROR_COLLECTED_STACK = 
 const TELEMETRY_ERROR_REPORTED = "browser.errors.reported_success_count";
 const TELEMETRY_ERROR_REPORTED_FAIL = "browser.errors.reported_failure_count";
 const TELEMETRY_ERROR_SAMPLE_RATE = "browser.errors.sample_rate";
 
 function createScriptError(options = {}) {
   const scriptError = Cc["@mozilla.org/scripterror;1"].createInstance(Ci.nsIScriptError);
   scriptError.init(
     options.message || "",
-    options.sourceName || null,
+    "sourceName" in options ? options.sourceName : null,
     options.sourceLine || null,
     options.lineNumber || null,
     options.columnNumber || null,
     options.flags || Ci.nsIScriptError.errorFlag,
     options.category || "chrome javascript",
   );
   return scriptError;
 }
@@ -205,25 +205,49 @@ add_task(async function testSampling() {
   ]});
 
   await reporter.observe(createScriptError({message: "Should log"}));
   ok(
     fetchPassedError(fetchSpy, "Should log"),
     "A 1.0 sample rate will cause the reporter to always collect errors.",
   );
 
+  await reporter.observe(createScriptError({message: "undefined", sourceName: undefined}));
+  ok(
+    fetchPassedError(fetchSpy, "undefined"),
+    "A missing sourceName doesn't break reporting.",
+  );
+
   await SpecialPowers.pushPrefEnv({set: [
     [PREF_SAMPLE_RATE, "0.0"],
   ]});
   await reporter.observe(createScriptError({message: "Shouldn't log"}));
   ok(
     !fetchPassedError(fetchSpy, "Shouldn't log"),
     "A 0.0 sample rate will cause the reporter to never collect errors.",
   );
 
+  await reporter.observe(createScriptError({
+    message: "chromedevtools",
+    sourceName: "chrome://devtools/Foo.jsm",
+  }));
+  ok(
+    fetchPassedError(fetchSpy, "chromedevtools"),
+    "chrome://devtools/ paths are sampled at 100% even if the default rate is 0.0.",
+  );
+
+  await reporter.observe(createScriptError({
+    message: "resourcedevtools",
+    sourceName: "resource://devtools/Foo.jsm",
+  }));
+  ok(
+    fetchPassedError(fetchSpy, "resourcedevtools"),
+    "resource://devtools/ paths are sampled at 100% even if the default rate is 0.0.",
+  );
+
   await SpecialPowers.pushPrefEnv({set: [
     [PREF_SAMPLE_RATE, ")fasdf"],
   ]});
   await reporter.observe(createScriptError({message: "Also shouldn't log"}));
   ok(
     !fetchPassedError(fetchSpy, "Also shouldn't log"),
     "An invalid sample rate will cause the reporter to never collect errors.",
   );
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -486,31 +486,24 @@ def check_compiler(compiler, language, t
     # example)
     if info.language == 'C' and info.language_version != 199901:
         if info.type in ('clang-cl', 'clang', 'gcc'):
             append_flag('-std=gnu99')
 
     # Note: MSVC, while supporting C++14, still reports 199711L for __cplusplus.
     # Note: this is a strict version check because we used to always add
     # -std=gnu++14.
-    draft_cxx14_version = 201300
     cxx14_version = 201402
     if info.language == 'C++':
         if info.type == 'clang' and info.language_version != cxx14_version:
             append_flag('-std=gnu++14')
         # MSVC 2015 headers include C++14 features, but don't guard them
         # with appropriate checks.
         elif info.type == 'clang-cl' and info.language_version != cxx14_version:
             append_flag('-std=c++14')
-        # GCC 4.9 indicates that it implements draft C++14 features
-        # instead of the full language.
-        elif info.type == 'gcc' and \
-                info.language_version not in (draft_cxx14_version,
-                                              cxx14_version):
-            append_flag('-std=gnu++14')
 
     # We force clang-cl to emulate Visual C++ 2017 version 15.6.0
     msvc_version = '19.13.26128'
     if info.type == 'clang-cl' and info.version != msvc_version:
         # This flag is a direct clang-cl flag that doesn't need -Xclang,
         # add it directly.
         flags.append('-fms-compatibility-version=%s' % msvc_version)
 
@@ -899,24 +892,24 @@ def compiler(language, host_or_target, c
                    info.target_endianness or 'unknown', host_or_target_str,
                    host_or_target.endianness))
 
         # Compiler version checks
         # ===================================================
         # Check the compiler version here instead of in `compiler_version` so
         # that the `checking` message doesn't pretend the compiler can be used
         # to then bail out one line later.
-        if info.type == 'gcc' and info.version < '4.9.0':
-            raise FatalCheckError(
-                'Only GCC 4.9 or newer is supported (found version %s).'
-                % info.version)
-
-        if info.type == 'gcc' and host_or_target.os == 'Android':
-            raise FatalCheckError('GCC is not supported on Android.\n'
-                                  'Please use clang from the Android NDK instead.')
+        if info.type == 'gcc':
+            if host_or_target.os == 'Android':
+                raise FatalCheckError('GCC is not supported on Android.\n'
+                                      'Please use clang from the Android NDK instead.')
+            if info.version < '6.1.0':
+                raise FatalCheckError(
+                    'Only GCC 6.1 or newer is supported (found version %s).'
+                    % info.version)
 
         # If you want to bump the version check here search for
         # cxx_alignof above, and see the associated comment.
         if info.type == 'clang' and not info.version:
             raise FatalCheckError(
                 'Only clang/llvm 3.6 or newer is supported.')
 
         if info.type == 'msvc':
@@ -1134,17 +1127,17 @@ def color_cflags(info):
     # version?
 
     # Code for auto-adding this flag to compiler invocations needs to
     # determine if an existing flag isn't already present. That is likely
     # using exact string matching on the returned value. So if the return
     # value changes to e.g. "<x>=always", exact string match may fail and
     # multiple color flags could be added. So examine downstream consumers
     # before adding flags to return values.
-    if info.type == 'gcc' and info.version >= '4.9.0':
+    if info.type == 'gcc':
         return '-fdiagnostics-color'
     elif info.type == 'clang':
         return '-fcolor-diagnostics'
     else:
         return ''
 
 
 set_config('COLOR_CFLAGS', color_cflags)
--- a/devtools/client/inspector/animation/components/AnimatedPropertyList.js
+++ b/devtools/client/inspector/animation/components/AnimatedPropertyList.js
@@ -1,21 +1,21 @@
 /* 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/. */
 
 "use strict";
 
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const AnimatedPropertyItem = createFactory(require("./AnimatedPropertyItem"));
 
-class AnimatedPropertyList extends PureComponent {
+class AnimatedPropertyList extends Component {
   static get propTypes() {
     return {
       animation: PropTypes.object.isRequired,
       emitEventForTest: PropTypes.func.isRequired,
       getAnimatedPropertyMap: PropTypes.func.isRequired,
       getComputedStyle: PropTypes.func.isRequired,
       simulateAnimation: PropTypes.func.isRequired,
     };
--- a/devtools/client/inspector/animation/components/AnimationItem.js
+++ b/devtools/client/inspector/animation/components/AnimationItem.js
@@ -1,23 +1,23 @@
 /* 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/. */
 
 "use strict";
 
 const { connect } = require("devtools/client/shared/vendor/react-redux");
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const AnimationTarget = createFactory(require("./AnimationTarget"));
 const SummaryGraph = createFactory(require("./graph/SummaryGraph"));
 
-class AnimationItem extends PureComponent {
+class AnimationItem extends Component {
   static get propTypes() {
     return {
       animation: PropTypes.object.isRequired,
       emitEventForTest: PropTypes.func.isRequired,
       getAnimatedPropertyMap: PropTypes.func.isRequired,
       getNodeFromActor: PropTypes.func.isRequired,
       onHideBoxModelHighlighter: PropTypes.func.isRequired,
       onShowBoxModelHighlighterForNode: PropTypes.func.isRequired,
--- a/devtools/client/inspector/animation/components/AnimationTarget.js
+++ b/devtools/client/inspector/animation/components/AnimationTarget.js
@@ -1,24 +1,24 @@
 /* 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/. */
 
 "use strict";
 
-const { PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const { translateNodeFrontToGrip } = require("devtools/client/inspector/shared/utils");
 
 const { REPS, MODE } = require("devtools/client/shared/components/reps/reps");
 const { Rep } = REPS;
 const ElementNode = REPS.ElementNode;
 
-class AnimationTarget extends PureComponent {
+class AnimationTarget extends Component {
   static get propTypes() {
     return {
       animation: PropTypes.object.isRequired,
       emitEventForTest: PropTypes.func.isRequired,
       getNodeFromActor: PropTypes.func.isRequired,
       onHideBoxModelHighlighter: PropTypes.func.isRequired,
       onShowBoxModelHighlighterForNode: PropTypes.func.isRequired,
       setSelectedNode: PropTypes.func.isRequired,
--- a/devtools/client/inspector/animation/components/AnimationTimelineTickList.js
+++ b/devtools/client/inspector/animation/components/AnimationTimelineTickList.js
@@ -1,29 +1,28 @@
 /* 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/. */
 
 "use strict";
 
-const { createFactory, PureComponent } =
-  require("devtools/client/shared/vendor/react");
+const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 const ReactDOM = require("devtools/client/shared/vendor/react-dom");
 
 const AnimationTimelineTickItem = createFactory(require("./AnimationTimelineTickItem"));
 
 const { findOptimalTimeInterval } = require("../utils/utils");
 
 // The minimum spacing between 2 time graduation headers in the timeline (px).
 const TIME_GRADUATION_MIN_SPACING = 40;
 
-class AnimationTimelineTickList extends PureComponent {
+class AnimationTimelineTickList extends Component {
   static get propTypes() {
     return {
       sidebarWidth: PropTypes.number.isRequired,
       timeScale: PropTypes.object.isRequired,
     };
   }
 
   constructor(props) {
--- a/devtools/client/inspector/animation/components/App.js
+++ b/devtools/client/inspector/animation/components/App.js
@@ -1,26 +1,26 @@
 /* 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/. */
 
 "use strict";
 
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 
 const AnimationDetailContainer = createFactory(require("./AnimationDetailContainer"));
 const AnimationListContainer = createFactory(require("./AnimationListContainer"));
 const AnimationToolbar = createFactory(require("./AnimationToolbar"));
 const NoAnimationPanel = createFactory(require("./NoAnimationPanel"));
 const SplitBox = createFactory(require("devtools/client/shared/components/splitter/SplitBox"));
 
-class App extends PureComponent {
+class App extends Component {
   static get propTypes() {
     return {
       addAnimationsCurrentTimeListener: PropTypes.func.isRequired,
       animations: PropTypes.arrayOf(PropTypes.object).isRequired,
       detailVisibility: PropTypes.bool.isRequired,
       emitEventForTest: PropTypes.func.isRequired,
       getAnimatedPropertyMap: PropTypes.func.isRequired,
       getAnimationsCurrentTime: PropTypes.func.isRequired,
--- a/devtools/client/inspector/animation/components/NoAnimationPanel.js
+++ b/devtools/client/inspector/animation/components/NoAnimationPanel.js
@@ -1,24 +1,24 @@
 /* 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/. */
 
 "use strict";
 
-const { PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 const { LocalizationHelper } = require("devtools/shared/l10n");
 
 const L10N =
   new LocalizationHelper("devtools/client/locales/animationinspector.properties");
 
-class NoAnimationPanel extends PureComponent {
+class NoAnimationPanel extends Component {
   static get propTypes() {
     return {
       elementPickerEnabled: PropTypes.bool.isRequired,
       toggleElementPicker: PropTypes.func.isRequired,
     };
   }
 
   shouldComponentUpdate(nextProps, nextState) {
--- a/devtools/client/inspector/animation/components/graph/SummaryGraphPath.js
+++ b/devtools/client/inspector/animation/components/graph/SummaryGraphPath.js
@@ -1,29 +1,29 @@
 /* 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/. */
 
 "use strict";
 
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
+const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const ReactDOM = require("devtools/client/shared/vendor/react-dom");
 
 const ComputedTimingPath = createFactory(require("./ComputedTimingPath"));
 const EffectTimingPath = createFactory(require("./EffectTimingPath"));
 const NegativeDelayPath = createFactory(require("./NegativeDelayPath"));
 const NegativeEndDelayPath = createFactory(require("./NegativeEndDelayPath"));
 const { DEFAULT_GRAPH_HEIGHT } = require("../../utils/graph-helper");
 
 // Minimum opacity for semitransparent fill color for keyframes's easing graph.
 const MIN_KEYFRAMES_EASING_OPACITY = 0.5;
 
-class SummaryGraphPath extends PureComponent {
+class SummaryGraphPath extends Component {
   static get propTypes() {
     return {
       animation: PropTypes.object.isRequired,
       emitEventForTest: PropTypes.func.isRequired,
       getAnimatedPropertyMap: PropTypes.object.isRequired,
       simulateAnimation: PropTypes.func.isRequired,
       timeScale: PropTypes.object.isRequired,
     };
--- a/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path_different-timescale.js
+++ b/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path_different-timescale.js
@@ -5,19 +5,19 @@
 
 // Test the Computed Timing Path component for different time scales.
 
 add_task(async function() {
   await addTab(URL_ROOT + "doc_simple_animation.html");
   const { inspector, panel } = await openAnimationInspector();
 
   info("Checking the path for different time scale");
-  await selectNodeAndWaitForAnimations(".no-compositor", inspector);
+  await selectNodeAndWaitForAnimations(".animated", inspector);
   const pathStringA = panel.querySelector(".animation-iteration-path").getAttribute("d");
 
   info("Select animation which has different time scale from no-compositor");
-  await selectNodeAndWaitForAnimations(".endDelayed", inspector);
+  await selectNodeAndWaitForAnimations("#endDelayed", inspector);
 
   info("Select no-compositor again");
-  await selectNodeAndWaitForAnimations(".no-compositor", inspector);
+  await selectNodeAndWaitForAnimations(".animated", inspector);
   const pathStringB = panel.querySelector(".animation-iteration-path").getAttribute("d");
   is(pathStringA, pathStringB, "Path string should be same even change the time scale");
 });
--- a/devtools/client/inspector/animation/test/head.js
+++ b/devtools/client/inspector/animation/test/head.js
@@ -10,20 +10,24 @@ Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/inspector/test/head.js", this);
 
 const FRAME_SCRIPT_URL = CHROME_URL_ROOT + "doc_frame_script.js";
 const TAB_NAME = "newanimationinspector";
 
 const ANIMATION_L10N =
   new LocalizationHelper("devtools/client/locales/animationinspector.properties");
 
+// Enable new animation inspector.
+Services.prefs.setBoolPref("devtools.new-animationinspector.enabled", true);
+
 // Auto clean-up when a test ends.
 // Clean-up all prefs that might have been changed during a test run
 // (safer here because if the test fails, then the pref is never reverted)
 registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("devtools.new-animationinspector.enabled");
   Services.prefs.clearUserPref("devtools.toolsidebar-width.inspector");
 });
 
 /**
  * Open the toolbox, with the inspector tool visible and the animationinspector
  * sidebar selected.
  *
  * @return {Promise} that resolves when the inspector is ready.
--- a/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
+++ b/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
@@ -48,26 +48,21 @@ add_task(async function() {
     inspector.markup.doc.defaultView);
 
   await onHidden;
   info("previous tooltip hidden");
 
   await onShown;
   info("event tooltip for the second div is shown");
 
-  info("Click on the animation inspector tab");
+  info("Click on the computed view tab");
   let onHighlighterHidden = toolbox.once("node-unhighlight");
-  let onTabInspectorSelected = inspector.sidebar.once("newanimationinspector-selected");
-  let onInspectorUpdated = inspector.once("inspector-updated");
-  let animationInspectorTab =
-    inspector.panelDoc.querySelector("#newanimationinspector-tab");
-  EventUtils.synthesizeMouseAtCenter(animationInspectorTab, {},
+  let onTabComputedViewSelected = inspector.sidebar.once("computedview-selected");
+  let computedViewTab = inspector.panelDoc.querySelector("#computedview-tab");
+  EventUtils.synthesizeMouseAtCenter(computedViewTab, {},
     inspector.panelDoc.defaultView);
 
-  await onTabInspectorSelected;
-  info("animation inspector was selected");
-
-  await onInspectorUpdated;
-  info("animation inspector was updated");
+  await onTabComputedViewSelected;
+  info("computed view was selected");
 
   await onHighlighterHidden;
   info("box model highlighter hidden after moving the mouse out of the markup view");
 });
--- a/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
+++ b/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
@@ -637,48 +637,55 @@ void SkScalerContext_CairoFT::generateMe
 
     FT_Error err = FT_Load_Glyph( face, glyph->getGlyphID(), fLoadGlyphFlags );
     if (err != 0) {
         return;
     }
 
     prepareGlyph(face->glyph);
 
+    if (fRec.fFlags & SkScalerContext::kVertical_Flag) {
+        glyph->fAdvanceX = -SkFDot6ToFloat(face->glyph->advance.x);
+        glyph->fAdvanceY = SkFDot6ToFloat(face->glyph->advance.y);
+    } else {
+        glyph->fAdvanceX = SkFDot6ToFloat(face->glyph->advance.x);
+        glyph->fAdvanceY = -SkFDot6ToFloat(face->glyph->advance.y);
+    }
+
+    SkIRect bounds;
     switch (face->glyph->format) {
     case FT_GLYPH_FORMAT_OUTLINE:
         if (!face->glyph->outline.n_contours) {
-            break;
+            return;
         }
 
         FT_BBox bbox;
         FT_Outline_Get_CBox(&face->glyph->outline, &bbox);
         bbox.xMin &= ~63;
         bbox.yMin &= ~63;
         bbox.xMax = (bbox.xMax + 63) & ~63;
         bbox.yMax = (bbox.yMax + 63) & ~63;
-        glyph->fWidth  = SkToU16(SkFDot6Floor(bbox.xMax - bbox.xMin));
-        glyph->fHeight = SkToU16(SkFDot6Floor(bbox.yMax - bbox.yMin));
-        glyph->fTop    = -SkToS16(SkFDot6Floor(bbox.yMax));
-        glyph->fLeft   = SkToS16(SkFDot6Floor(bbox.xMin));
+        bounds = SkIRect::MakeLTRB(SkFDot6Floor(bbox.xMin),
+                                   -SkFDot6Floor(bbox.yMax),
+                                   SkFDot6Floor(bbox.xMax),
+                                   -SkFDot6Floor(bbox.yMin));
 
         if (isLCD(fRec)) {
             // In FreeType < 2.8.1, LCD filtering, if explicitly used, may
             // add padding to the glyph. When not used, there is no padding.
             // As of 2.8.1, LCD filtering is now always supported and may
             // add padding even if an LCD filter is not explicitly set.
             // Regardless, if no LCD filtering is used, or if LCD filtering
             // doesn't add padding, it is safe to modify the glyph's bounds
             // here. generateGlyphImage will detect if the mask is smaller
             // than the bounds and clip things appropriately.
             if (fRec.fFlags & kLCD_Vertical_Flag) {
-                glyph->fTop -= 1;
-                glyph->fHeight += 2;
+                bounds.outset(0, 1);
             } else {
-                glyph->fLeft -= 1;
-                glyph->fWidth += 2;
+                bounds.outset(1, 0);
             }
         }
         break;
     case FT_GLYPH_FORMAT_BITMAP:
         if (face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) {
             glyph->fMaskFormat = SkMask::kARGB32_Format;
         }
 
@@ -697,38 +704,37 @@ void SkScalerContext_CairoFT::generateMe
             SkRect srcRect = SkRect::MakeXYWH(
                 SkIntToScalar(face->glyph->bitmap_left),
                 -SkIntToScalar(face->glyph->bitmap_top),
                 SkIntToScalar(face->glyph->bitmap.width),
                 SkIntToScalar(face->glyph->bitmap.rows));
             SkRect destRect;
             fShapeMatrix.mapRect(&destRect, srcRect);
             SkIRect glyphRect = destRect.roundOut();
-            glyph->fWidth  = SkToU16(glyphRect.width());
-            glyph->fHeight = SkToU16(glyphRect.height());
-            glyph->fTop    = SkToS16(SkScalarRoundToInt(destRect.fTop));
-            glyph->fLeft   = SkToS16(SkScalarRoundToInt(destRect.fLeft));
+            bounds = SkIRect::MakeXYWH(SkScalarRoundToInt(destRect.fLeft),
+                                       SkScalarRoundToInt(destRect.fTop),
+                                       glyphRect.width(),
+                                       glyphRect.height());
         } else {
-            glyph->fWidth  = SkToU16(face->glyph->bitmap.width);
-            glyph->fHeight = SkToU16(face->glyph->bitmap.rows);
-            glyph->fTop    = -SkToS16(face->glyph->bitmap_top);
-            glyph->fLeft   = SkToS16(face->glyph->bitmap_left);
+            bounds = SkIRect::MakeXYWH(face->glyph->bitmap_left,
+                                       -face->glyph->bitmap_top,
+                                       face->glyph->bitmap.width,
+                                       face->glyph->bitmap.rows);
         }
         break;
     default:
         SkDEBUGFAIL("unknown glyph format");
         return;
     }
 
-    if (fRec.fFlags & SkScalerContext::kVertical_Flag) {
-        glyph->fAdvanceX = -SkFDot6ToFloat(face->glyph->advance.x);
-        glyph->fAdvanceY = SkFDot6ToFloat(face->glyph->advance.y);
-    } else {
-        glyph->fAdvanceX = SkFDot6ToFloat(face->glyph->advance.x);
-        glyph->fAdvanceY = -SkFDot6ToFloat(face->glyph->advance.y);
+    if (SkIRect::MakeXYWH(SHRT_MIN, SHRT_MIN, USHRT_MAX, USHRT_MAX).contains(bounds)) {
+        glyph->fWidth  = SkToU16(bounds.width());
+        glyph->fHeight = SkToU16(bounds.height());
+        glyph->fLeft   = SkToS16(bounds.left());
+        glyph->fTop    = SkToS16(bounds.top());
     }
 }
 
 void SkScalerContext_CairoFT::generateImage(const SkGlyph& glyph)
 {
     SkASSERT(fScaledFont != nullptr);
     CairoLockedFTFace faceLock(fScaledFont);
     FT_Face face = faceLock.getFace();
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2993,34 +2993,38 @@ ScrollFrameHelper::ScrollToImpl(nsPoint 
   }
 
   nsCOMPtr<nsIDocShell> docShell = presContext->GetDocShell();
   if (docShell) {
     docShell->NotifyScrollObservers();
   }
 }
 
-static int32_t
+static Maybe<int32_t>
 MaxZIndexInList(nsDisplayList* aList, nsDisplayListBuilder* aBuilder)
 {
-  int32_t maxZIndex = -1;
+  Maybe<int32_t> maxZIndex = Nothing();
   for (nsDisplayItem* item = aList->GetBottom(); item; item = item->GetAbove()) {
-    maxZIndex = std::max(maxZIndex, item->ZIndex());
+    if (!maxZIndex) {
+      maxZIndex = Some(item->ZIndex());
+    } else {
+      maxZIndex = Some(std::max(maxZIndex.value(), item->ZIndex()));
+    }
   }
   return maxZIndex;
 }
 
 template<class T>
 static void
 AppendInternalItemToTop(const nsDisplayListSet& aLists,
                         T* aItem,
-                        int32_t aZIndex)
-{
-  if (aZIndex >= 0) {
-    aItem->SetOverrideZIndex(aZIndex);
+                        const Maybe<int32_t>& aZIndex)
+{
+  if (aZIndex) {
+    aItem->SetOverrideZIndex(aZIndex.value());
     aLists.PositionedDescendants()->AppendToTop(aItem);
   } else {
     aLists.Content()->AppendToTop(aItem);
   }
 }
 
 static const uint32_t APPEND_OWN_LAYER = 0x1;
 static const uint32_t APPEND_POSITIONED = 0x2;
@@ -3055,19 +3059,22 @@ AppendToTop(nsDisplayListBuilder* aBuild
   } else {
     newItem = MakeDisplayItem<nsDisplayWrapList>(aBuilder, aSourceFrame, aSource, asr);
   }
 
   if (aFlags & APPEND_POSITIONED) {
     // We want overlay scrollbars to always be on top of the scrolled content,
     // but we don't want them to unnecessarily cover overlapping elements from
     // outside our scroll frame.
-    int32_t zIndex = -1;
+    Maybe<int32_t> zIndex = Nothing();
     if (aFlags & APPEND_OVERLAY) {
       zIndex = MaxZIndexInList(aLists.PositionedDescendants(), aBuilder);
+    } else if (aSourceFrame->StylePosition()->mZIndex.GetUnit() == eStyleUnit_Integer) {
+      zIndex = Some(aSourceFrame->StylePosition()->mZIndex.GetIntValue());
+
     }
     AppendInternalItemToTop(aLists, newItem, zIndex);
   } else {
     aLists.BorderBackground()->AppendToTop(newItem);
   }
 }
 
 struct HoveredStateComparator
@@ -3140,24 +3147,31 @@ ScrollFrameHelper::AppendScrollPartsTo(n
     if (scrollParts[i] == mVScrollbarBox) {
       flags |= nsDisplayOwnLayerFlags::eVerticalScrollbar;
       appendToTopFlags |= APPEND_SCROLLBAR_CONTAINER;
     }
     if (scrollParts[i] == mHScrollbarBox) {
       flags |= nsDisplayOwnLayerFlags::eHorizontalScrollbar;
       appendToTopFlags |= APPEND_SCROLLBAR_CONTAINER;
     }
+    if (scrollParts[i] == mResizerBox &&
+        !HasResizer()) {
+      continue;
+    }
 
     // The display port doesn't necessarily include the scrollbars, so just
     // include all of the scrollbars if we are in a RCD-RSF. We only do
     // this for the root scrollframe of the root content document, which is
     // zoomable, and where the scrollbar sizes are bounded by the widget.
     nsRect visible = mIsRoot && mOuter->PresContext()->IsRootContentDocument()
                      ? scrollParts[i]->GetVisualOverflowRectRelativeToParent()
                      : aBuilder->GetVisibleRect();
+    if (visible.IsEmpty()) {
+      continue;
+    }
     nsRect dirty = mIsRoot && mOuter->PresContext()->IsRootContentDocument()
                      ? scrollParts[i]->GetVisualOverflowRectRelativeToParent()
                      : aBuilder->GetDirtyRect();
 
     // Always create layers for overlay scrollbars so that we don't create a
     // giant layer covering the whole scrollport if both scrollbars are visible.
     bool isOverlayScrollbar = (flags != nsDisplayOwnLayerFlags::eNone) && overlayScrollbars;
     bool createLayer = aCreateLayer || isOverlayScrollbar ||
@@ -3177,18 +3191,20 @@ ScrollFrameHelper::AppendScrollPartsTo(n
     }
 
     if (createLayer) {
       appendToTopFlags |= APPEND_OWN_LAYER;
     }
     if (aPositioned) {
       appendToTopFlags |= APPEND_POSITIONED;
     }
-    if (overlayScrollbars) {
+    if (overlayScrollbars ||
+        scrollParts[i] == mResizerBox) {
       appendToTopFlags |= APPEND_OVERLAY;
+      aBuilder->SetBuiltOverlayScrollbars(true);
     }
 
     {
       nsDisplayListBuilder::AutoBuildingDisplayList
         buildingForChild(aBuilder, scrollParts[i],
                          visible + mOuter->GetOffsetTo(scrollParts[i]),
                          dirty + mOuter->GetOffsetTo(scrollParts[i]), true);
       nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
@@ -3323,25 +3339,16 @@ ScrollFrameHelper::BuildDisplayList(nsDi
       if (mScrollPosForLayerPixelAlignment == nsPoint(-1,-1)) {
         mScrollPosForLayerPixelAlignment = mScrollPosAtLastPaint;
       }
     } else {
       mScrollPosForLayerPixelAlignment = nsPoint(-1,-1);
     }
   }
 
-  // Adding overlay scrollbars requires us to look at the display list
-  // for the highest z-index item, which isn't possible during partial
-  // building. Mark the frame modified and do a full rebuild of this
-  // scrollframe.
-  if (LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) &&
-      aBuilder->IsRetainingDisplayList()) {
-    aBuilder->MarkCurrentFrameModifiedDuringBuilding();
-  }
-
   // It's safe to get this value before the DecideScrollableLayer call below
   // because that call cannot create a displayport for root scroll frames,
   // and hence it cannot create an ignore scroll frame.
   bool ignoringThisScrollFrame =
     aBuilder->GetIgnoreScrollFrame() == mOuter || IsIgnoringViewportClipping();
 
   // Overflow clipping can never clip frames outside our subtree, so there
   // is no need to worry about whether we are a moving frame that might clip
@@ -3700,23 +3707,23 @@ ScrollFrameHelper::BuildDisplayList(nsDi
         ScrollbarStyles scrollbarStyles = GetScrollbarStylesFromFrame();
         if (scrollbarStyles.mOverscrollBehaviorX != StyleOverscrollBehavior::Auto ||
             scrollbarStyles.mOverscrollBehaviorY != StyleOverscrollBehavior::Auto) {
           info |= CompositorHitTestInfo::eRequiresTargetConfirmation;
         }
         nsDisplayCompositorHitTestInfo* hitInfo =
             MakeDisplayItem<nsDisplayCompositorHitTestInfo>(aBuilder, mScrolledFrame, info, 1,
                 Some(mScrollPort + aBuilder->ToReferenceFrame(mOuter)));
-        AppendInternalItemToTop(scrolledContent, hitInfo, INT32_MAX);
+        AppendInternalItemToTop(scrolledContent, hitInfo, Some(INT32_MAX));
       }
       if (aBuilder->IsBuildingLayerEventRegions()) {
         nsDisplayLayerEventRegions* inactiveRegionItem =
             MakeDisplayItem<nsDisplayLayerEventRegions>(aBuilder, mScrolledFrame, 1);
         inactiveRegionItem->AddInactiveScrollPort(mScrolledFrame, mScrollPort + aBuilder->ToReferenceFrame(mOuter));
-        AppendInternalItemToTop(scrolledContent, inactiveRegionItem, INT32_MAX);
+        AppendInternalItemToTop(scrolledContent, inactiveRegionItem, Some(INT32_MAX));
       }
     }
 
     if (aBuilder->ShouldBuildScrollInfoItemsForHoisting()) {
       aBuilder->AppendNewScrollInfoItemForHoisting(
         MakeDisplayItem<nsDisplayScrollInfoLayer>(aBuilder, mScrolledFrame,
                                                 mOuter));
     }
--- a/layout/painting/RetainedDisplayListBuilder.cpp
+++ b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -1104,17 +1104,25 @@ RetainedDisplayListBuilder::AttemptParti
   // nsLayoutUtils::InvalidateForDisplayPortChange. The display port change also
   // marks the frame modified, so those regions are cleared here as well.
   AutoClearFramePropsArray modifiedFrames;
   AutoClearFramePropsArray framesWithProps;
   GetModifiedAndFramesWithProps(&mBuilder, &modifiedFrames.Frames(), &framesWithProps.Frames());
 
   // Do not allow partial builds if the retained display list is empty, or if
   // ShouldBuildPartial heuristic fails.
-  const bool shouldBuildPartial = !mList.IsEmpty() && ShouldBuildPartial(modifiedFrames.Frames());
+  bool shouldBuildPartial = !List()->IsEmpty() && ShouldBuildPartial(modifiedFrames.Frames());
+
+  // We don't support retaining with overlay scrollbars, since they require
+  // us to look at the display list and pick the highest z-index, which
+  // we can't do during partial building.
+  if (mBuilder.BuiltOverlayScrollbars()) {
+    shouldBuildPartial = false;
+    mBuilder.SetBuiltOverlayScrollbars(false);
+  }
 
   if (mPreviousCaret != mBuilder.GetCaretFrame()) {
     if (mPreviousCaret) {
       if (mBuilder.MarkFrameModifiedDuringBuilding(mPreviousCaret)) {
         modifiedFrames.Frames().AppendElement(mPreviousCaret);
       }
     }
 
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -998,17 +998,18 @@ nsDisplayListBuilder::nsDisplayListBuild
       mHaveScrollableDisplayPort(false),
       mWindowDraggingAllowed(false),
       mIsBuildingForPopup(nsLayoutUtils::IsPopup(aReferenceFrame)),
       mForceLayerForScrollParent(false),
       mAsyncPanZoomEnabled(nsLayoutUtils::AsyncPanZoomEnabled(aReferenceFrame)),
       mBuildingInvisibleItems(false),
       mHitTestIsForVisibility(false),
       mIsBuilding(false),
-      mInInvalidSubtree(false)
+      mInInvalidSubtree(false),
+      mBuiltOverlayScrollbars(false)
 {
   MOZ_COUNT_CTOR(nsDisplayListBuilder);
 
   const bool useWRHitTest =
     gfxPrefs::WebRenderHitTest() && gfxVars::UseWebRender();
 
   mBuildCompositorHitTestInfo = mAsyncPanZoomEnabled && IsForPainting() &&
     (useWRHitTest || gfxPrefs::SimpleEventRegionItems());
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -834,16 +834,19 @@ public:
   void SetInTransform(bool aInTransform) { mInTransform = aInTransform; }
 
   /**
    * Return true if we're currently building a display list for a
    * nested presshell.
    */
   bool IsInSubdocument() { return mPresShellStates.Length() > 1; }
 
+  void SetBuiltOverlayScrollbars(bool aOverlayScrollbars) { mBuiltOverlayScrollbars = aOverlayScrollbars; }
+  bool BuiltOverlayScrollbars() { return mBuiltOverlayScrollbars; }
+
   /**
    * Return true if we're currently building a display list for the presshell
    * of a chrome document, or if we're building the display list for a popup.
    */
   bool IsInChromeDocumentOrPopup() {
     return mIsInChromePresContext || mIsBuildingForPopup;
   }
 
@@ -2003,16 +2006,17 @@ private:
   bool                           mForceLayerForScrollParent;
   bool                           mAsyncPanZoomEnabled;
   bool                           mBuildingInvisibleItems;
   bool                           mHitTestIsForVisibility;
   bool                           mIsBuilding;
   bool                           mInInvalidSubtree;
   bool                           mBuildCompositorHitTestInfo;
   bool                           mLessEventRegionItems;
+  bool                           mBuiltOverlayScrollbars;
 };
 
 class nsDisplayItem;
 class nsDisplayList;
 /**
  * nsDisplayItems are put in singly-linked lists rooted in an nsDisplayList.
  * nsDisplayItemLink holds the link. The lists are linked from lowest to
  * highest in z-order.
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -79,30 +79,32 @@ def GCC_BASE(version):
 def GCC(version):
     return GCC_BASE(version) + SUPPORTS_GNU99
 
 
 @memoize
 def GXX(version):
     return GCC_BASE(version) + DEFAULT_CXX_97 + SUPPORTS_GNUXX11
 
-SUPPORTS_DRAFT_CXX14_VERSION = {
-    '-std=gnu++14': DRAFT_CXX_14,
-}
 
 SUPPORTS_DRAFT_CXX14_VERSION = {
     '-std=gnu++14': DRAFT_CXX_14,
 }
 
-GCC_4_7 = GCC('4.7.3')
-GXX_4_7 = GXX('4.7.3')
 GCC_4_9 = GCC('4.9.3')
 GXX_4_9 = GXX('4.9.3') + SUPPORTS_DRAFT_CXX14_VERSION
 GCC_5 = GCC('5.2.1') + DEFAULT_C11
 GXX_5 = GXX('5.2.1') + SUPPORTS_GNUXX14
+GCC_6 = GCC('6.4.0') + DEFAULT_C11
+GXX_6 = GXX('6.4.0') + DEFAULT_CXX_14
+GCC_7 = GCC('7.3.0') + DEFAULT_C11
+GXX_7 = GXX('7.3.0') + DEFAULT_CXX_14
+
+DEFAULT_GCC = GCC_6
+DEFAULT_GXX = GXX_6
 
 GCC_PLATFORM_LITTLE_ENDIAN = {
     '__BYTE_ORDER__': 1234,
 }
 
 GCC_PLATFORM_BIG_ENDIAN = {
     '__BYTE_ORDER__': 4321,
 }
@@ -187,16 +189,18 @@ CLANG_3_6 = CLANG('3.6.2') + DEFAULT_C11
 CLANGXX_3_6 = CLANGXX('3.6.2') + {
     '-std=gnu++11': {
         '__has_feature(cxx_alignof)': '1',
     },
     '-std=gnu++14': {
         '__has_feature(cxx_alignof)': '1',
     },
 }
+DEFAULT_CLANG = CLANG_3_6
+DEFAULT_CLANGXX = CLANGXX_3_6
 
 
 def CLANG_PLATFORM(gcc_platform):
     base = {
         '--target=x86_64-linux-gnu': GCC_PLATFORM_X86_64_LINUX[None],
         '--target=x86_64-darwin11.2.0': GCC_PLATFORM_X86_64_OSX[None],
         '--target=i686-linux-gnu': GCC_PLATFORM_X86_LINUX[None],
         '--target=i686-darwin11.2.0': GCC_PLATFORM_X86_OSX[None],
@@ -408,206 +412,219 @@ class BaseToolchainTest(BaseConfigureTes
             'RUST_LIB_PREFIX',
             'RUST_LIB_SUFFIX',
             'OBJ_SUFFIX',
         ):
             self.assertEquals('%s=%s' % (k, sandbox.get_config(k)),
                               '%s=%s' % (k, library_name_info[k]))
 
 
+def old_gcc_message(old_ver):
+    return 'Only GCC 6.1 or newer is supported (found version {}).'.format(old_ver)
+
+
 class LinuxToolchainTest(BaseToolchainTest):
     PATHS = {
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64_LINUX,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64_LINUX,
-        '/usr/bin/gcc-4.7': GCC_4_7 + GCC_PLATFORM_X86_64_LINUX,
-        '/usr/bin/g++-4.7': GXX_4_7 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/gcc-4.9': GCC_4_9 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/g++-4.9': GXX_4_9 + GCC_PLATFORM_X86_64_LINUX,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_64_LINUX,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_64_LINUX,
-        '/usr/bin/clang': CLANG_3_6 + CLANG_PLATFORM_X86_64_LINUX,
-        '/usr/bin/clang++': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_LINUX,
+        '/usr/bin/gcc-6': GCC_6 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/g++-6': GXX_6 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/gcc-7': GCC_7 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/g++-7': GXX_7 + GCC_PLATFORM_X86_64_LINUX,
+        '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_64_LINUX,
+        '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_LINUX,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_64_LINUX,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_LINUX,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_64_LINUX,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_64_LINUX,
     }
-    GCC_4_7_RESULT = ('Only GCC 4.9 or newer is supported '
-                      '(found version 4.7.3).')
+
+    GCC_4_7_RESULT = old_gcc_message('4.7.3')
     GXX_4_7_RESULT = GCC_4_7_RESULT
-    GCC_4_9_RESULT = CompilerResult(
+    GCC_4_9_RESULT = old_gcc_message('4.9.3')
+    GXX_4_9_RESULT = GCC_4_9_RESULT
+    GCC_5_RESULT = old_gcc_message('5.2.1')
+    GXX_5_RESULT = GCC_5_RESULT
+    GCC_6_RESULT = CompilerResult(
         flags=['-std=gnu99'],
-        version='4.9.3',
+        version='6.4.0',
         type='gcc',
-        compiler='/usr/bin/gcc',
+        compiler='/usr/bin/gcc-6',
         language='C',
     )
-    GXX_4_9_RESULT = CompilerResult(
-        flags=['-std=gnu++14'],
-        version='4.9.3',
+    GXX_6_RESULT = CompilerResult(
+        flags=[],
+        version='6.4.0',
         type='gcc',
-        compiler='/usr/bin/g++',
+        compiler='/usr/bin/g++-6',
         language='C++',
     )
-    GCC_5_RESULT = CompilerResult(
+    GCC_7_RESULT = CompilerResult(
         flags=['-std=gnu99'],
-        version='5.2.1',
+        version='7.3.0',
         type='gcc',
-        compiler='/usr/bin/gcc-5',
+        compiler='/usr/bin/gcc-7',
         language='C',
     )
-    GXX_5_RESULT = CompilerResult(
-        flags=['-std=gnu++14'],
-        version='5.2.1',
+    GXX_7_RESULT = CompilerResult(
+        flags=[],
+        version='7.3.0',
         type='gcc',
-        compiler='/usr/bin/g++-5',
+        compiler='/usr/bin/g++-7',
         language='C++',
     )
+    DEFAULT_GCC_RESULT = GCC_6_RESULT + {'compiler': '/usr/bin/gcc'}
+    DEFAULT_GXX_RESULT = GXX_6_RESULT + {'compiler': '/usr/bin/g++'}
+
     CLANG_3_3_RESULT = CompilerResult(
         flags=[],
         version='3.3.0',
         type='clang',
         compiler='/usr/bin/clang-3.3',
         language='C',
     )
     CLANGXX_3_3_RESULT = 'Only clang/llvm 3.6 or newer is supported.'
     CLANG_3_6_RESULT = CompilerResult(
         flags=['-std=gnu99'],
         version='3.6.2',
         type='clang',
-        compiler='/usr/bin/clang',
+        compiler='/usr/bin/clang-3.6',
         language='C',
     )
     CLANGXX_3_6_RESULT = CompilerResult(
         flags=['-std=gnu++14'],
         version='3.6.2',
         type='clang',
-        compiler='/usr/bin/clang++',
+        compiler='/usr/bin/clang++-3.6',
         language='C++',
     )
+    DEFAULT_CLANG_RESULT = CLANG_3_6_RESULT + {'compiler': '/usr/bin/clang'}
+    DEFAULT_CLANGXX_RESULT = CLANGXX_3_6_RESULT + {'compiler': '/usr/bin/clang++'}
 
     def test_gcc(self):
         # We'll try gcc and clang, and find gcc first.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
 
     def test_unsupported_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_7_RESULT,
+            'c_compiler': self.GCC_4_9_RESULT,
         }, environ={
-            'CC': 'gcc-4.7',
-            'CXX': 'g++-4.7',
+            'CC': 'gcc-4.9',
+            'CXX': 'g++-4.9',
         })
 
         # Maybe this should be reporting the mismatched version instead.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_7_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.GXX_4_9_RESULT,
         }, environ={
-            'CXX': 'g++-4.7',
+            'CXX': 'g++-4.9',
         })
 
     def test_overridden_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_5_RESULT,
-            'cxx_compiler': self.GXX_5_RESULT,
+            'c_compiler': self.GCC_7_RESULT,
+            'cxx_compiler': self.GXX_7_RESULT,
         }, environ={
-            'CC': 'gcc-5',
-            'CXX': 'g++-5',
+            'CC': 'gcc-7',
+            'CXX': 'g++-7',
         })
 
     def test_guess_cxx(self):
         # When CXX is not set, we guess it from CC.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_5_RESULT,
-            'cxx_compiler': self.GXX_5_RESULT,
+            'c_compiler': self.GCC_7_RESULT,
+            'cxx_compiler': self.GXX_7_RESULT,
         }, environ={
-            'CC': 'gcc-5',
+            'CC': 'gcc-7',
         })
 
     def test_mismatched_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
             'cxx_compiler': (
-                'The target C compiler is version 4.9.3, while the target '
-                'C++ compiler is version 5.2.1. Need to use the same compiler '
+                'The target C compiler is version 6.4.0, while the target '
+                'C++ compiler is version 7.3.0. Need to use the same compiler '
                 'version.'),
         }, environ={
-            'CXX': 'g++-5',
+            'CXX': 'g++-7',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_9_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
             'host_cxx_compiler': (
-                'The host C compiler is version 4.9.3, while the host '
-                'C++ compiler is version 5.2.1. Need to use the same compiler '
+                'The host C compiler is version 6.4.0, while the host '
+                'C++ compiler is version 7.3.0. Need to use the same compiler '
                 'version.'),
         }, environ={
-            'HOST_CXX': 'g++-5',
+            'HOST_CXX': 'g++-7',
         })
 
     def test_mismatched_compiler(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
             'cxx_compiler': (
                 'The target C compiler is gcc, while the target C++ compiler '
                 'is clang. Need to use the same compiler suite.'),
         }, environ={
             'CXX': 'clang++',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_9_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
             'host_cxx_compiler': (
                 'The host C compiler is gcc, while the host C++ compiler '
                 'is clang. Need to use the same compiler suite.'),
         }, environ={
             'HOST_CXX': 'clang++',
         })
 
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': '`%s` is not a C compiler.'
             % mozpath.abspath('/usr/bin/g++'),
         }, environ={
             'CC': 'g++',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
             'cxx_compiler': '`%s` is not a C++ compiler.'
             % mozpath.abspath('/usr/bin/gcc'),
         }, environ={
             'CXX': 'gcc',
         })
 
     def test_clang(self):
         # We'll try gcc and clang, but since there is no gcc (gcc-x.y doesn't
         # count), find clang.
         paths = {
             k: v for k, v in self.PATHS.iteritems()
             if os.path.basename(k) not in ('gcc', 'g++')
         }
         self.do_toolchain_test(paths, {
-            'c_compiler': self.CLANG_3_6_RESULT,
-            'cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'c_compiler': self.DEFAULT_CLANG_RESULT,
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         })
 
     def test_guess_cxx_clang(self):
         # When CXX is not set, we guess it from CC.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT + {
-                'compiler': '/usr/bin/clang-3.6',
-            },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
-                'compiler': '/usr/bin/clang++-3.6',
-            },
+            'c_compiler': self.CLANG_3_6_RESULT,
+            'cxx_compiler': self.CLANGXX_3_6_RESULT,
         }, environ={
             'CC': 'clang-3.6',
         })
 
     def test_unsupported_clang(self):
         # clang 3.3 C compiler is perfectly fine, but we need more for C++.
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': self.CLANG_3_3_RESULT,
@@ -630,21 +647,21 @@ class LinuxToolchainTest(BaseToolchainTe
 
     def test_absolute_path(self):
         paths = dict(self.PATHS)
         paths.update({
             '/opt/clang/bin/clang': paths['/usr/bin/clang'],
             '/opt/clang/bin/clang++': paths['/usr/bin/clang++'],
         })
         result = {
-            'c_compiler': self.CLANG_3_6_RESULT + {
+            'c_compiler': self.DEFAULT_CLANG_RESULT + {
                 'compiler': '/opt/clang/bin/clang',
             },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
-                'compiler': '/opt/clang/bin/clang++'
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
+                'compiler': '/opt/clang/bin/clang++',
             },
         }
         self.do_toolchain_test(paths, result, environ={
             'CC': '/opt/clang/bin/clang',
             'CXX': '/opt/clang/bin/clang++',
         })
         # With CXX guess too.
         self.do_toolchain_test(paths, result, environ={
@@ -653,155 +670,154 @@ class LinuxToolchainTest(BaseToolchainTe
 
     def test_atypical_name(self):
         paths = dict(self.PATHS)
         paths.update({
             '/usr/bin/afl-clang-fast': paths['/usr/bin/clang'],
             '/usr/bin/afl-clang-fast++': paths['/usr/bin/clang++'],
         })
         self.do_toolchain_test(paths, {
-            'c_compiler': self.CLANG_3_6_RESULT + {
+            'c_compiler': self.DEFAULT_CLANG_RESULT + {
                 'compiler': '/usr/bin/afl-clang-fast',
             },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
                 'compiler': '/usr/bin/afl-clang-fast++',
             },
         }, environ={
             'CC': 'afl-clang-fast',
             'CXX': 'afl-clang-fast++',
         })
 
     def test_mixed_compilers(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT,
-            'cxx_compiler': self.CLANGXX_3_6_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_CLANG_RESULT,
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         }, environ={
             'CC': 'clang',
             'HOST_CC': 'gcc',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT,
-            'cxx_compiler': self.CLANGXX_3_6_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_CLANG_RESULT,
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         }, environ={
             'CC': 'clang',
             'CXX': 'clang++',
             'HOST_CC': 'gcc',
         })
 
 
 class LinuxSimpleCrossToolchainTest(BaseToolchainTest):
     TARGET = 'i686-pc-linux-gnu'
     PATHS = LinuxToolchainTest.PATHS
-    GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
-    GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
+    DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
+    DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
 
     def test_cross_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT + {
+            'c_compiler': self.DEFAULT_GCC_RESULT + {
                 'flags': ['-m32']
             },
-            'cxx_compiler': self.GXX_4_9_RESULT + {
+            'cxx_compiler': self.DEFAULT_GXX_RESULT + {
                 'flags': ['-m32']
             },
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
 
     def test_cross_clang(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT + {
+            'c_compiler': self.DEFAULT_CLANG_RESULT + {
                 'flags': ['--target=i686-linux-gnu'],
             },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
                 'flags': ['--target=i686-linux-gnu'],
             },
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
             'CC': 'clang',
         })
 
 
 class LinuxX86_64CrossToolchainTest(BaseToolchainTest):
     HOST = 'i686-pc-linux-gnu'
     TARGET = 'x86_64-pc-linux-gnu'
     PATHS = {
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_LINUX,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_LINUX,
-        '/usr/bin/clang': CLANG_3_6 + CLANG_PLATFORM_X86_LINUX,
-        '/usr/bin/clang++': CLANGXX_3_6 + CLANG_PLATFORM_X86_LINUX,
+        '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_LINUX,
+        '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_LINUX,
+        '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_LINUX,
+        '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_LINUX,
     }
-    GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
-    GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
+    DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
+    DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
 
     def test_cross_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT + {
+            'c_compiler': self.DEFAULT_GCC_RESULT + {
                 'flags': ['-m64']
             },
-            'cxx_compiler': self.GXX_4_9_RESULT + {
+            'cxx_compiler': self.DEFAULT_GXX_RESULT + {
                 'flags': ['-m64']
             },
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
 
     def test_cross_clang(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT + {
+            'c_compiler': self.DEFAULT_CLANG_RESULT + {
                 'flags': ['--target=x86_64-linux-gnu'],
             },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
                 'flags': ['--target=x86_64-linux-gnu'],
             },
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
             'CC': 'clang',
         })
 
 
 class OSXToolchainTest(BaseToolchainTest):
     HOST = 'x86_64-apple-darwin11.2.0'
     PATHS = {
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64_OSX,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64_OSX,
-        '/usr/bin/gcc-4.7': GCC_4_7 + GCC_PLATFORM_X86_64_OSX,
-        '/usr/bin/g++-4.7': GXX_4_7 + GCC_PLATFORM_X86_64_OSX,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_64_OSX,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_64_OSX,
-        '/usr/bin/clang': CLANG_3_6 + CLANG_PLATFORM_X86_64_OSX,
-        '/usr/bin/clang++': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_OSX,
+        '/usr/bin/gcc-7': GCC_7 + GCC_PLATFORM_X86_64_OSX,
+        '/usr/bin/g++-7': GXX_7 + GCC_PLATFORM_X86_64_OSX,
+        '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_64_OSX,
+        '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_OSX,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_64_OSX,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_OSX,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_64_OSX,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_64_OSX,
     }
     CLANG_3_3_RESULT = LinuxToolchainTest.CLANG_3_3_RESULT
     CLANGXX_3_3_RESULT = LinuxToolchainTest.CLANGXX_3_3_RESULT
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
-    GCC_4_7_RESULT = LinuxToolchainTest.GCC_4_7_RESULT
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
     GCC_5_RESULT = LinuxToolchainTest.GCC_5_RESULT
     GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT
+    GCC_7_RESULT = LinuxToolchainTest.GCC_7_RESULT
+    GXX_7_RESULT = LinuxToolchainTest.GXX_7_RESULT
 
     def test_clang(self):
         # We only try clang because gcc is known not to work.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT,
-            'cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'c_compiler': self.DEFAULT_CLANG_RESULT,
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         })
 
     def test_not_gcc(self):
         # We won't pick GCC if it's the only thing available.
         paths = {
             k: v for k, v in self.PATHS.iteritems()
             if os.path.basename(k) not in ('clang', 'clang++')
         }
@@ -817,29 +833,29 @@ class OSXToolchainTest(BaseToolchainTest
         }, environ={
             'CC': 'clang-3.3',
             'CXX': 'clang++-3.3',
         })
 
     def test_forced_gcc(self):
         # GCC can still be forced if the user really wants it.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_5_RESULT,
-            'cxx_compiler': self.GXX_5_RESULT,
+            'c_compiler': self.GCC_7_RESULT,
+            'cxx_compiler': self.GXX_7_RESULT,
         }, environ={
-            'CC': 'gcc-5',
-            'CXX': 'g++-5',
+            'CC': 'gcc-7',
+            'CXX': 'g++-7',
         })
 
     def test_forced_unsupported_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_7_RESULT,
+            'c_compiler': self.GCC_5_RESULT,
         }, environ={
-            'CC': 'gcc-4.7',
-            'CXX': 'g++-4.7',
+            'CC': 'gcc-5',
+            'CXX': 'g++-5',
         })
 
 
 class WindowsToolchainTest(BaseToolchainTest):
     HOST = 'i686-pc-mingw32'
 
     # For the purpose of this test, it doesn't matter that the paths are not
     # real Windows paths.
@@ -848,24 +864,26 @@ class WindowsToolchainTest(BaseToolchain
         '/opt/VS_2013u3/bin/cl': VS_2013u3 + VS_PLATFORM_X86,
         '/opt/VS_2015/bin/cl': VS_2015 + VS_PLATFORM_X86,
         '/opt/VS_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86,
         '/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86,
         '/opt/VS_2015u3/bin/cl': VS_2015u3 + VS_PLATFORM_X86,
         '/opt/VS_2017u4/bin/cl': VS_2017u4 + VS_PLATFORM_X86,
         '/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86,
         '/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86,
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_WIN,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_WIN,
-        '/usr/bin/gcc-4.7': GCC_4_7 + GCC_PLATFORM_X86_WIN,
-        '/usr/bin/g++-4.7': GXX_4_7 + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/gcc-4.9': GCC_4_9 + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/g++-4.9': GXX_4_9 + GCC_PLATFORM_X86_WIN,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_WIN,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_WIN,
-        '/usr/bin/clang': CLANG_3_6 + CLANG_PLATFORM_X86_WIN,
-        '/usr/bin/clang++': CLANGXX_3_6 + CLANG_PLATFORM_X86_WIN,
+        '/usr/bin/gcc-6': GCC_6 + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/g++-6': GXX_6 + GCC_PLATFORM_X86_WIN,
+        '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_WIN,
+        '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_WIN,
     }
 
     VS_2013u2_RESULT = (
         'This version (18.00.30501) of the MSVC compiler is not supported.\n'
@@ -922,35 +940,26 @@ class WindowsToolchainTest(BaseToolchain
                '-fms-compatibility-version=19.13.26128'],
         version='19.13.26128',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C++',
     )
     CLANG_3_3_RESULT = LinuxToolchainTest.CLANG_3_3_RESULT
     CLANGXX_3_3_RESULT = LinuxToolchainTest.CLANGXX_3_3_RESULT
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
-    GCC_4_7_RESULT = LinuxToolchainTest.GCC_4_7_RESULT
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
     GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
-    GXX_4_9_RESULT = CompilerResult(
-        flags=['-std=gnu++14'],
-        version='4.9.3',
-        type='gcc',
-        compiler='/usr/bin/g++',
-        language='C++',
-    )
+    GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
     GCC_5_RESULT = LinuxToolchainTest.GCC_5_RESULT
-    GXX_5_RESULT = CompilerResult(
-        flags=['-std=gnu++14'],
-        version='5.2.1',
-        type='gcc',
-        compiler='/usr/bin/g++-5',
-        language='C++',
-    )
+    GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT
+    GCC_6_RESULT = LinuxToolchainTest.GCC_6_RESULT
+    GXX_6_RESULT = LinuxToolchainTest.GXX_6_RESULT
+    DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
+    DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
 
     # VS2017u6 or greater is required.
     def test_msvc(self):
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': self.VS_2017u6_RESULT,
             'cxx_compiler': self.VSXX_2017u6_RESULT,
         })
 
@@ -1010,37 +1019,37 @@ class WindowsToolchainTest(BaseToolchain
 
     def test_gcc(self):
         # We'll pick GCC if msvc and clang-cl can't be found.
         paths = {
             k: v for k, v in self.PATHS.iteritems()
             if os.path.basename(k) not in ('cl', 'clang-cl')
         }
         self.do_toolchain_test(paths, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
 
     def test_overridden_unsupported_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_7_RESULT,
+            'c_compiler': self.GCC_5_RESULT,
         }, environ={
-            'CC': 'gcc-4.7',
-            'CXX': 'g++-4.7',
+            'CC': 'gcc-5',
+            'CXX': 'g++-5',
         })
 
     def test_clang(self):
         # We'll pick clang if nothing else is found.
         paths = {
             k: v for k, v in self.PATHS.iteritems()
             if os.path.basename(k) not in ('cl', 'clang-cl', 'gcc')
         }
         self.do_toolchain_test(paths, {
-            'c_compiler': self.CLANG_3_6_RESULT,
-            'cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'c_compiler': self.DEFAULT_CLANG_RESULT,
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         })
 
     def test_overridden_unsupported_clang(self):
         # clang 3.3 C compiler is perfectly fine, but we need more for C++.
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': self.CLANG_3_3_RESULT,
             'cxx_compiler': self.CLANGXX_3_3_RESULT,
         }, environ={
@@ -1068,24 +1077,28 @@ class Windows64ToolchainTest(WindowsTool
         '/opt/VS_2013u3/bin/cl': VS_2013u3 + VS_PLATFORM_X86_64,
         '/opt/VS_2015/bin/cl': VS_2015 + VS_PLATFORM_X86_64,
         '/opt/VS_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86_64,
         '/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86_64,
         '/opt/VS_2015u3/bin/cl': VS_2015u3 + VS_PLATFORM_X86_64,
         '/opt/VS_2017u4/bin/cl': VS_2017u4 + VS_PLATFORM_X86_64,
         '/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86_64,
         '/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86_64,
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64_WIN,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64_WIN,
-        '/usr/bin/gcc-4.7': GCC_4_7 + GCC_PLATFORM_X86_64_WIN,
-        '/usr/bin/g++-4.7': GXX_4_7 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/gcc-4.9': GCC_4_9 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/g++-4.9': GXX_4_9 + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_64_WIN,
-        '/usr/bin/clang': CLANG_3_6 + CLANG_PLATFORM_X86_64_WIN,
-        '/usr/bin/clang++': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_WIN,
+        '/usr/bin/gcc-6': GCC_6 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/g++-6': GXX_6 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/gcc-7': GCC_7 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/g++-7': GXX_7 + GCC_PLATFORM_X86_64_WIN,
+        '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_64_WIN,
+        '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_64_WIN,
     }
 
     def test_cannot_cross(self):
         paths = {
@@ -1095,35 +1108,46 @@ class Windows64ToolchainTest(WindowsTool
             'c_compiler': ('Target C compiler target CPU (x86) '
                            'does not match --target CPU (x86_64)'),
         })
 
 
 class LinuxCrossCompileToolchainTest(BaseToolchainTest):
     TARGET = 'arm-unknown-linux-gnu'
     PATHS = {
-        '/usr/bin/arm-linux-gnu-gcc': GCC_4_9 + GCC_PLATFORM_ARM_LINUX,
-        '/usr/bin/arm-linux-gnu-g++': GXX_4_9 + GCC_PLATFORM_ARM_LINUX,
-        '/usr/bin/arm-linux-gnu-gcc-4.7': GCC_4_7 + GCC_PLATFORM_ARM_LINUX,
-        '/usr/bin/arm-linux-gnu-g++-4.7': GXX_4_7 + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-gcc-4.9': GCC_4_9 + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-g++-4.9': GXX_4_9 + GCC_PLATFORM_ARM_LINUX,
         '/usr/bin/arm-linux-gnu-gcc-5': GCC_5 + GCC_PLATFORM_ARM_LINUX,
         '/usr/bin/arm-linux-gnu-g++-5': GXX_5 + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-gcc': DEFAULT_GCC + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-g++': DEFAULT_GXX + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-gcc-7': GCC_7 + GCC_PLATFORM_ARM_LINUX,
+        '/usr/bin/arm-linux-gnu-g++-7': GXX_7 + GCC_PLATFORM_ARM_LINUX,
     }
     PATHS.update(LinuxToolchainTest.PATHS)
-    ARM_GCC_4_7_RESULT = LinuxToolchainTest.GXX_4_7_RESULT
-    ARM_GCC_5_RESULT = LinuxToolchainTest.GCC_5_RESULT + {
-        'compiler': '/usr/bin/arm-linux-gnu-gcc-5',
+    ARM_GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
+    ARM_GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
+    ARM_GCC_5_RESULT = LinuxToolchainTest.GCC_5_RESULT
+    ARM_GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT
+    ARM_DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT + {
+        'compiler': '/usr/bin/arm-linux-gnu-gcc',
+    }
+    ARM_DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT + {
+        'compiler': '/usr/bin/arm-linux-gnu-g++',
     }
-    ARM_GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT + {
-        'compiler': '/usr/bin/arm-linux-gnu-g++-5',
+    ARM_GCC_7_RESULT = LinuxToolchainTest.GCC_7_RESULT + {
+        'compiler': '/usr/bin/arm-linux-gnu-gcc-7',
     }
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
-    GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
-    GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
+    ARM_GXX_7_RESULT = LinuxToolchainTest.GXX_7_RESULT + {
+        'compiler': '/usr/bin/arm-linux-gnu-g++-7',
+    }
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
+    DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
+    DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
 
     little_endian = FakeCompiler(GCC_PLATFORM_LINUX,
                                  GCC_PLATFORM_LITTLE_ENDIAN)
     big_endian = FakeCompiler(GCC_PLATFORM_LINUX, GCC_PLATFORM_BIG_ENDIAN)
 
     PLATFORMS = {
         'i686-pc-linux-gnu': GCC_PLATFORM_X86_LINUX,
         'x86_64-pc-linux-gnu': GCC_PLATFORM_X86_64_LINUX,
@@ -1199,27 +1223,27 @@ class LinuxCrossCompileToolchainTest(Bas
         PLATFORMS['mips64-unknown-linux-gnuabi64'] + GCC_PLATFORM_LITTLE_ENDIAN
     PLATFORMS['mipsel-unknown-linux-gnu'] = \
         PLATFORMS['mips-unknown-linux-gnu'] + GCC_PLATFORM_LITTLE_ENDIAN
 
     def do_test_cross_gcc_32_64(self, host, target):
         self.HOST = host
         self.TARGET = target
         paths = {
-            '/usr/bin/gcc': GCC_4_9 + self.PLATFORMS[host],
-            '/usr/bin/g++': GXX_4_9 + self.PLATFORMS[host],
+            '/usr/bin/gcc': DEFAULT_GCC + self.PLATFORMS[host],
+            '/usr/bin/g++': DEFAULT_GXX + self.PLATFORMS[host],
         }
         cross_flags = {
             'flags': ['-m64' if '64' in target else '-m32']
         }
         self.do_toolchain_test(paths, {
-            'c_compiler': self.GCC_4_9_RESULT + cross_flags,
-            'cxx_compiler': self.GXX_4_9_RESULT + cross_flags,
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT + cross_flags,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT + cross_flags,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
         self.HOST = LinuxCrossCompileToolchainTest.HOST
         self.TARGET = LinuxCrossCompileToolchainTest.TARGET
 
     def test_cross_x86_x64(self):
         self.do_test_cross_gcc_32_64(
             'i686-pc-linux-gnu', 'x86_64-pc-linux-gnu')
         self.do_test_cross_gcc_32_64(
@@ -1239,147 +1263,147 @@ class LinuxCrossCompileToolchainTest(Bas
 
     def do_test_cross_gcc(self, host, target):
         self.HOST = host
         self.TARGET = target
         host_cpu = host.split('-')[0]
         cpu, manufacturer, os = target.split('-', 2)
         toolchain_prefix = '/usr/bin/%s-%s' % (cpu, os)
         paths = {
-            '/usr/bin/gcc': GCC_4_9 + self.PLATFORMS[host],
-            '/usr/bin/g++': GXX_4_9 + self.PLATFORMS[host],
+            '/usr/bin/gcc': DEFAULT_GCC + self.PLATFORMS[host],
+            '/usr/bin/g++': DEFAULT_GXX + self.PLATFORMS[host],
         }
         self.do_toolchain_test(paths, {
             'c_compiler': ('Target C compiler target CPU (%s) '
                            'does not match --target CPU (%s)'
                            % (host_cpu, cpu)),
         })
 
         paths.update({
-            '%s-gcc' % toolchain_prefix: GCC_4_9 + self.PLATFORMS[target],
-            '%s-g++' % toolchain_prefix: GXX_4_9 + self.PLATFORMS[target],
+            '%s-gcc' % toolchain_prefix: DEFAULT_GCC + self.PLATFORMS[target],
+            '%s-g++' % toolchain_prefix: DEFAULT_GXX + self.PLATFORMS[target],
         })
         self.do_toolchain_test(paths, {
-            'c_compiler': self.GCC_4_9_RESULT + {
+            'c_compiler': self.DEFAULT_GCC_RESULT + {
                 'compiler': '%s-gcc' % toolchain_prefix,
             },
-            'cxx_compiler': self.GXX_4_9_RESULT + {
+            'cxx_compiler': self.DEFAULT_GXX_RESULT + {
                 'compiler': '%s-g++' % toolchain_prefix,
             },
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
         self.HOST = LinuxCrossCompileToolchainTest.HOST
         self.TARGET = LinuxCrossCompileToolchainTest.TARGET
 
     def test_cross_gcc_misc(self):
         for target in self.PLATFORMS:
             if not target.endswith('-pc-linux-gnu'):
                 self.do_test_cross_gcc('x86_64-pc-linux-gnu', target)
 
     def test_cannot_cross(self):
         self.TARGET = 'mipsel-unknown-linux-gnu'
 
         paths = {
-            '/usr/bin/gcc': GCC_4_9 + self.PLATFORMS['mips-unknown-linux-gnu'],
-            '/usr/bin/g++': GXX_4_9 + self.PLATFORMS['mips-unknown-linux-gnu'],
+            '/usr/bin/gcc': DEFAULT_GCC + self.PLATFORMS['mips-unknown-linux-gnu'],
+            '/usr/bin/g++': DEFAULT_GXX + self.PLATFORMS['mips-unknown-linux-gnu'],
         }
         self.do_toolchain_test(paths, {
             'c_compiler': ('Target C compiler target endianness (big) '
                            'does not match --target endianness (little)'),
         })
         self.TARGET = LinuxCrossCompileToolchainTest.TARGET
 
     def test_overridden_cross_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.ARM_GCC_5_RESULT,
-            'cxx_compiler': self.ARM_GXX_5_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.ARM_GCC_7_RESULT,
+            'cxx_compiler': self.ARM_GXX_7_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         }, environ={
-            'CC': 'arm-linux-gnu-gcc-5',
-            'CXX': 'arm-linux-gnu-g++-5',
+            'CC': 'arm-linux-gnu-gcc-7',
+            'CXX': 'arm-linux-gnu-g++-7',
         })
 
     def test_overridden_unsupported_cross_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.ARM_GCC_4_7_RESULT,
+            'c_compiler': self.ARM_GCC_4_9_RESULT,
         }, environ={
-            'CC': 'arm-linux-gnu-gcc-4.7',
-            'CXX': 'arm-linux-gnu-g++-4.7',
+            'CC': 'arm-linux-gnu-gcc-4.9',
+            'CXX': 'arm-linux-gnu-g++-4.9',
         })
 
     def test_guess_cross_cxx(self):
         # When CXX is not set, we guess it from CC.
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.ARM_GCC_5_RESULT,
-            'cxx_compiler': self.ARM_GXX_5_RESULT,
-            'host_c_compiler': self.GCC_4_9_RESULT,
-            'host_cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.ARM_GCC_7_RESULT,
+            'cxx_compiler': self.ARM_GXX_7_RESULT,
+            'host_c_compiler': self.DEFAULT_GCC_RESULT,
+            'host_cxx_compiler': self.DEFAULT_GXX_RESULT,
         }, environ={
-            'CC': 'arm-linux-gnu-gcc-5',
+            'CC': 'arm-linux-gnu-gcc-7',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.ARM_GCC_5_RESULT,
-            'cxx_compiler': self.ARM_GXX_5_RESULT,
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'c_compiler': self.ARM_DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.ARM_DEFAULT_GXX_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
-            'CC': 'arm-linux-gnu-gcc-5',
+            'CC': 'arm-linux-gnu-gcc',
             'HOST_CC': 'clang',
         })
 
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.ARM_GCC_5_RESULT,
-            'cxx_compiler': self.ARM_GXX_5_RESULT,
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'c_compiler': self.ARM_DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.ARM_DEFAULT_GXX_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
-            'CC': 'arm-linux-gnu-gcc-5',
-            'CXX': 'arm-linux-gnu-g++-5',
+            'CC': 'arm-linux-gnu-gcc',
+            'CXX': 'arm-linux-gnu-g++',
             'HOST_CC': 'clang',
         })
 
     def test_cross_clang(self):
-        cross_clang_result = self.CLANG_3_6_RESULT + {
+        cross_clang_result = self.DEFAULT_CLANG_RESULT + {
             'flags': ['--target=arm-linux-gnu'],
         }
-        cross_clangxx_result = self.CLANGXX_3_6_RESULT + {
+        cross_clangxx_result = self.DEFAULT_CLANGXX_RESULT + {
             'flags': ['--target=arm-linux-gnu'],
         }
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': cross_clang_result,
             'cxx_compiler': cross_clangxx_result,
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
             'CC': 'clang',
             'HOST_CC': 'clang',
         })
 
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': cross_clang_result,
             'cxx_compiler': cross_clangxx_result,
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
             'CC': 'clang',
         })
 
     def test_cross_atypical_clang(self):
         paths = dict(self.PATHS)
         paths.update({
             '/usr/bin/afl-clang-fast': paths['/usr/bin/clang'],
             '/usr/bin/afl-clang-fast++': paths['/usr/bin/clang++'],
         })
-        afl_clang_result = self.CLANG_3_6_RESULT + {
+        afl_clang_result = self.DEFAULT_CLANG_RESULT + {
             'compiler': '/usr/bin/afl-clang-fast',
         }
-        afl_clangxx_result = self.CLANGXX_3_6_RESULT + {
+        afl_clangxx_result = self.DEFAULT_CLANGXX_RESULT + {
             'compiler': '/usr/bin/afl-clang-fast++',
         }
         self.do_toolchain_test(paths, {
             'c_compiler': afl_clang_result + {
                 'flags': ['--target=arm-linux-gnu'],
             },
             'cxx_compiler': afl_clangxx_result + {
                 'flags': ['--target=arm-linux-gnu'],
@@ -1390,29 +1414,29 @@ class LinuxCrossCompileToolchainTest(Bas
             'CC': 'afl-clang-fast',
             'CXX': 'afl-clang-fast++',
         })
 
 
 class OSXCrossToolchainTest(BaseToolchainTest):
     TARGET = 'i686-apple-darwin11.2.0'
     PATHS = LinuxToolchainTest.PATHS
-    CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
-    CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT
+    DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
+    DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
 
     def test_osx_cross(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.CLANG_3_6_RESULT + {
+            'c_compiler': self.DEFAULT_CLANG_RESULT + {
                 'flags': ['--target=i686-darwin11.2.0'],
             },
-            'cxx_compiler': self.CLANGXX_3_6_RESULT + {
+            'cxx_compiler': self.DEFAULT_CLANGXX_RESULT + {
                 'flags': ['--target=i686-darwin11.2.0'],
             },
-            'host_c_compiler': self.CLANG_3_6_RESULT,
-            'host_cxx_compiler': self.CLANGXX_3_6_RESULT,
+            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
+            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
         }, environ={
             'CC': 'clang',
         })
 
     def test_cannot_osx_cross(self):
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': 'Target C compiler target kernel (Linux) does not '
                           'match --target kernel (Darwin)',
@@ -1420,26 +1444,26 @@ class OSXCrossToolchainTest(BaseToolchai
             'CC': 'gcc',
         })
 
 
 class OpenBSDToolchainTest(BaseToolchainTest):
     HOST = 'x86_64-unknown-openbsd6.1'
     TARGET = 'x86_64-unknown-openbsd6.1'
     PATHS = {
-        '/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64 + GCC_PLATFORM_OPENBSD,
-        '/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64 + GCC_PLATFORM_OPENBSD,
+        '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_64 + GCC_PLATFORM_OPENBSD,
+        '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_64 + GCC_PLATFORM_OPENBSD,
     }
-    GCC_4_9_RESULT = LinuxToolchainTest.GCC_4_9_RESULT
-    GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
+    DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
+    DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
 
     def test_gcc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.GCC_4_9_RESULT,
-            'cxx_compiler': self.GXX_4_9_RESULT,
+            'c_compiler': self.DEFAULT_GCC_RESULT,
+            'cxx_compiler': self.DEFAULT_GXX_RESULT,
         })
 
 
 class RustTest(BaseConfigureTest):
     def invoke_cargo(self, stdin, args):
         if args == ('--version', '--verbose'):
             return 0, 'cargo 2.0\nrelease: 2.0', ''
         raise NotImplementedError('unsupported arguments')
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -200,17 +200,17 @@ linux64-base-toolchains/opt:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_64_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-clang-3.9
-        - linux64-gcc-4.9
+        - linux64-gcc-6
         - linux64-rust-1.24
         - linux64-sccache
 
 linux64-base-toolchains/debug:
     description: "Linux64 base toolchains Debug"
     index:
         product: firefox
         job-name: linux64-base-toolchains-debug
@@ -230,17 +230,17 @@ linux64-base-toolchains/debug:
             - builds/releng_base_linux_64_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: debug
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-clang-3.9
-        - linux64-gcc-4.9
+        - linux64-gcc-6
         - linux64-rust-1.24
         - linux64-sccache
 
 linux/opt:
     description: "Linux32 Opt"
     index:
         product: firefox
         job-name: linux-opt
--- a/toolkit/content/aboutProfiles.xhtml
+++ b/toolkit/content/aboutProfiles.xhtml
@@ -10,22 +10,21 @@
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> %brandDTD;
 <!ENTITY % profilesDTD SYSTEM "chrome://global/locale/aboutProfiles.dtd"> %profilesDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&aboutProfiles.title;</title>
     <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
-    <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
     <link rel="stylesheet" href="chrome://mozapps/skin/aboutProfiles.css" type="text/css" />
     <script type="application/javascript" src="chrome://global/content/aboutProfiles.js" />
   </head>
-  <body id="body" dir="&locale.dir;">
-    <div id="action-box">
+  <body id="body" dir="&locale.dir;" class="wide-container">
+    <div id="action-box" class="notice-box">
       <h3>&aboutProfiles.restart.title;</h3>
       <button id="restart-in-safe-mode-button">&aboutProfiles.restart.inSafeMode;</button>
       <button id="restart-button">&aboutProfiles.restart.normal;</button>
     </div>
 
     <h1>&aboutProfiles.title;</h1>
     <div class="page-subtitle">&aboutProfiles.subtitle;</div>
 
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -13,29 +13,27 @@
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&aboutSupport.pageTitle;</title>
 
     <link rel="icon" type="image/png" id="favicon"
           href="chrome://branding/content/icon32.png"/>
-    <link rel="stylesheet" href="chrome://global/skin/in-content/common.css"
-          type="text/css"/>
     <link rel="stylesheet" href="chrome://global/skin/aboutSupport.css"
           type="text/css"/>
 
     <script type="application/javascript"
             src="chrome://global/content/aboutSupport.js"/>
   </head>
 
-  <body dir="&locale.dir;">
+  <body dir="&locale.dir;" class="wide-container">
 
 #ifndef ANDROID
-    <div id="action-box">
+    <div id="action-box" class="notice-box">
       <div id="reset-box">
         <h3>&refreshProfile.title;</h3>
         <button id="reset-box-button">
           &refreshProfile.button.label;
         </button>
       </div>
       <div id="safe-mode-box">
         <h3>&aboutSupport.safeModeTitle;</h3>
--- a/toolkit/content/aboutUrlClassifier.css
+++ b/toolkit/content/aboutUrlClassifier.css
@@ -1,64 +1,22 @@
 /* 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/. */
 
-html {
-  --aboutUrlClassifier-table-background: #ebebeb;
-  background-color: var(--in-content-page-background);
-}
-
-body {
-  margin: 40px 48px;
-}
+@import url("chrome://global/skin/in-content/info-pages.css");
 
 .major-section {
   margin-top: 2em;
   margin-bottom: 1em;
   font-size: large;
   text-align: start;
   font-weight: bold;
 }
 
-table {
-  background-color: var(--aboutUrlClassifier-table-background);
-  color: var(--in-content-text-color);
-  font: message-box;
-  text-align: start;
-  width: 100%;
-  border: 1px solid var(--in-content-border-color);
-  border-spacing: 0px;
-}
-
-th, td {
-  border: 1px solid var(--in-content-border-color);
-  padding: 4px;
-}
-
-thead th {
-  text-align: center;
-}
-
-th {
-  text-align: start;
-  background-color: var(--in-content-table-header-background);
-  color: var(--in-content-selected-text);
-}
-
-th.column {
-  white-space: nowrap;
-  width: 0px;
-}
-
-td {
-  text-align: start;
-  border-color: var(--in-content-table-border-dark-color);
-}
-
 #provider-table > tbody > tr >  td:last-child {
   text-align: center;
 }
 
 #cache-table > tbody > tr >  td:last-child {
   text-align: center;
 }
 
@@ -68,9 +26,10 @@ td {
 
 .options > .toggle-container-with-text {
   display: inline-flex;
 }
 
 button {
   margin-inline-start: 0;
   margin-inline-end: 8px;
+  padding: 3px;
 }
--- a/toolkit/content/aboutUrlClassifier.xhtml
+++ b/toolkit/content/aboutUrlClassifier.xhtml
@@ -9,22 +9,21 @@
 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> %brandDTD;
 <!ENTITY % urlClassifierDTD SYSTEM "chrome://global/locale/aboutUrlClassifier.dtd"> %urlClassifierDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <title>&aboutUrlClassifier.title;</title>
-  <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
   <link rel="stylesheet" href="chrome://global/content/aboutUrlClassifier.css" type="text/css"/>
   <script type="text/javascript" src="chrome://global/content/aboutUrlClassifier.js"></script>
 </head>
 
-<body onload="onLoad()" class="aboutPageWideContainer">
+<body onload="onLoad()" class="wide-container">
   <h1>&aboutUrlClassifier.title;</h1>
   <div id="provider">
     <h2 class="major-section">&aboutUrlClassifier.providerTitle;</h2>
     <table id="provider-table">
       <thead>
         <tr id="provider-head-row">
           <th id="col-provider">&aboutUrlClassifier.provider;</th>
           <th id="col-lastupdatetime">&aboutUrlClassifier.providerLastUpdateTime;</th>
--- a/toolkit/themes/shared/aboutProfiles.css
+++ b/toolkit/themes/shared/aboutProfiles.css
@@ -1,69 +1,28 @@
 /* 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/. */
 
-html {
-  --aboutProfiles-table-background: #ebebeb;
-  background-color: var(--in-content-page-background);
-}
-
-body {
-  margin: 40px 48px;
-}
+ @import url("chrome://global/skin/in-content/info-pages.css");
 
 .page-subtitle {
   margin-bottom: 3em;
 }
 
 button {
   margin-inline-start: 0;
   margin-inline-end: 8px;
-}
-
-table {
-  background-color: var(--aboutProfiles-table-background);
-  color: var(--in-content-text-color);
-  font: message-box;
-  text-align: start;
-  width: 100%;
-  border: 1px solid var(--in-content-border-color);
-  border-spacing: 0px;
-}
-
-th, td {
-  border: 1px solid var(--in-content-border-color);
-  padding: 4px;
-  text-align: start;
-}
-
-th {
-  background-color: var(--in-content-table-header-background);
-  color: var(--in-content-selected-text);
-}
-
-th.column {
-  white-space: nowrap;
-  width: 0px;
-}
-
-td {
-  border-color: var(--in-content-table-border-dark-color);
-  unicode-bidi: plaintext; /* Make sure file paths will be LTR */
+  padding: 3px;
 }
 
 #action-box {
-  background-color: var(--aboutProfiles-table-background);
-  border: 1px solid var(--in-content-border-color);
-  color: var(--in-content-text-color);
   float: right;
   margin-top: 2em;
   margin-bottom: 20px;
   margin-inline-start: 20px;
   margin-inline-end: 0;
-  padding: 16px;
   width: 30%;
 }
 
 #action-box:dir(rtl) {
   float: left;
 }
--- a/toolkit/themes/shared/aboutSupport.css
+++ b/toolkit/themes/shared/aboutSupport.css
@@ -1,79 +1,38 @@
 /* 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/. */
 
-html {
-  --aboutSupport-table-background: #ebebeb;
-  background-color: var(--in-content-page-background);
-}
-
-body {
-  margin: 40px 48px;
-}
+@import url("chrome://global/skin/in-content/info-pages.css");
 
 .page-subtitle {
   margin-bottom: 3em;
 }
 
 .major-section {
   margin-top: 2em;
   margin-bottom: 1em;
   font-size: large;
   text-align: start;
   font-weight: bold;
 }
 
 button {
   margin-inline-start: 0;
   margin-inline-end: 8px;
-}
-
-table {
-  background-color: var(--aboutSupport-table-background);
-  color: var(--in-content-text-color);
-  font: message-box;
-  text-align: start;
-  width: 100%;
-  border: 1px solid var(--in-content-border-color);
-  border-spacing: 0px;
-}
-
-th, td {
-  border: 1px solid var(--in-content-border-color);
-  padding: 4px;
-}
-
-thead th {
-  text-align: center;
-}
-
-th {
-  text-align: start;
-  background-color: var(--in-content-table-header-background);
-  color: var(--in-content-selected-text);
+  padding: 3px;
 }
 
 th.title-column {
   white-space: nowrap;
   width: 0px;
   font-size: medium;
 }
 
-th.column {
-  white-space: nowrap;
-  width: 0px;
-}
-
-td {
-  text-align: start;
-  border-color: var(--in-content-table-border-dark-color);
-}
-
 td.integer {
   text-align: end;
   font-family: monospace;
 }
 
 .prefs-table {
   width: 100%;
   table-layout: fixed;
@@ -87,25 +46,21 @@ td.integer {
 
 .pref-value {
   width: 30%;
   white-space: nowrap;
   overflow: hidden;
 }
 
 #action-box {
-  background-color: var(--aboutSupport-table-background);
-  border: 1px solid var(--in-content-border-color);
-  color: var(--in-content-text-color);
   float: right;
   margin-top: 2em;
   margin-bottom: 20px;
   margin-inline-start: 20px;
   margin-inline-end: 0;
-  padding: 16px;
   width: 30%;
 }
 
 #action-box,
 #reset-box,
 #safe-mode-box {
   display: none;
 }
@@ -122,15 +77,11 @@ td.integer {
   display: block;
 }
 
 #verify-place-result {
   max-height: 200px;
   overflow: auto;
 }
 
-.block {
-  display: block;
-}
-
 .hidden {
   display: none;
 }
--- a/toolkit/themes/shared/in-content/common.inc.css
+++ b/toolkit/themes/shared/in-content/common.inc.css
@@ -33,16 +33,17 @@
   --in-content-tab-color: #424f5a;
   --in-content-link-color: #0a8dff;
   --in-content-link-color-hover: #0060df;
   --in-content-link-color-active: #003eaa;
   --in-content-link-color-visited: #0a8dff;
   --in-content-primary-button-background: #0a84ff;
   --in-content-primary-button-background-hover: #0060df;
   --in-content-primary-button-background-active: #003EAA;
+  --in-content-table-background: #ebebeb;
   --in-content-table-border-dark-color: #d1d1d1;
   --in-content-table-header-background: #0a84ff;
 }
 
 html|html,
 xul|page,
 xul|window {
   font: message-box;
--- a/toolkit/themes/shared/in-content/info-pages.inc.css
+++ b/toolkit/themes/shared/in-content/info-pages.inc.css
@@ -15,16 +15,20 @@ body {
   flex-direction: column;
   box-sizing: border-box;
   min-height: 100vh;
   padding: 40px 48px;
   align-items: center;
   justify-content: center;
 }
 
+body.wide-container {
+  display: block;
+}
+
 .container {
   min-width: var(--in-content-container-min-width);
   max-width: var(--in-content-container-max-width);
 }
 
 .container.restore-chosen {
   display: flex;
   flex-direction: column;
@@ -117,14 +121,56 @@ button {
 .tree-container > tree {
   height: 100%;
 }
 
 tree {
   width: 100%;
 }
 
+/* Tables */
+table {
+  background-color: var(--in-content-table-background);
+  color: var(--in-content-text-color);
+  font: message-box;
+  text-align: start;
+  width: 100%;
+  border: 1px solid var(--in-content-border-color);
+  border-spacing: 0px;
+}
+
+th, td {
+  border: 1px solid var(--in-content-border-color);
+  padding: 4px;
+  text-align: start;
+}
+
+thead th {
+  text-align: center;
+}
+
+th {
+  background-color: var(--in-content-table-header-background);
+  color: var(--in-content-selected-text);
+}
+
+th.column {
+  white-space: nowrap;
+  width: 0px;
+}
+
+td {
+  border-color: var(--in-content-table-border-dark-color);
+  unicode-bidi: plaintext; /* Make sure file paths will be LTR */
+}
+
 /* Illustrated Info Pages */
-
 .illustrated .title {
   margin-inline-start: 0;
   padding-inline-start: 0;
 }
+
+.notice-box {
+  background-color: var(--in-content-table-background);
+  border: 1px solid var(--in-content-border-color);
+  color: var(--in-content-text-color);
+  padding: 16px;
+}