Bug 1217851 - Fix mozplugin's import-headjs-globals on Windows. r=pbro
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Mon, 26 Oct 2015 13:16:03 +0000
changeset 304899 10533587f045f2f10e19e12d147312f5afbd3b6a
parent 304898 150b4bb5d07bb86735e914e1a2afcde3fcf33a12
child 304900 077054793949902e63158acf15cb5b79f2936173
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1217851
milestone44.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
Bug 1217851 - Fix mozplugin's import-headjs-globals on Windows. r=pbro
testing/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js
--- a/testing/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js
+++ b/testing/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js
@@ -80,17 +80,17 @@ module.exports = function(context) {
   //--------------------------------------------------------------------------
   // Public
   //--------------------------------------------------------------------------
 
   return {
     Program: function(node) {
       var pathAndFilename = this.getFilename();
       var processPath = process.cwd();
-      var isTest = /.*\/browser_.+\.js$/.test(pathAndFilename);
+      var isTest = /.*[\\/]browser_.+\.js$/.test(pathAndFilename);
 
       if (!isTest) {
         return;
       }
 
       var testFilename = path.basename(pathAndFilename);
       var testPath = path.join(processPath, testFilename);
       var headjs = path.join(processPath, "head.js");