From 993d702ce986af14cfb76e588fe8d802fbc3753f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 22 Jun 2015 13:41:27 -0700 Subject: [PATCH] Include deprecated APIs when running core specs --- static/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/index.js b/static/index.js index c0ee749eb..8fe71a6a9 100644 --- a/static/index.js +++ b/static/index.js @@ -75,7 +75,8 @@ var setupWindow = function(loadSettings) { ModuleCache.register(loadSettings); ModuleCache.add(loadSettings.resourcePath); - require('grim').includeDeprecatedAPIs = false; + // Only include deprecated APIs when running core spec + require('grim').includeDeprecatedAPIs = isRunningCoreSpecs(loadSettings); // Start the crash reporter before anything else. require('crash-reporter').start({ @@ -219,6 +220,14 @@ var setupWindowBackground = function() { }, false); } +var isRunningCoreSpecs = function(loadSettings) { + return !!(loadSettings && + loadSettings.isSpec && + loadSettings.specDirectory && + loadSettings.resourcePath && + path.dirname(loadSettings.specDirectory) === loadSettings.resourcePath); +} + parseLoadSettings(); setupWindowBackground();