Bug 1299012 - Fix import-tests.py to avoid breaking three multicol reftests r=dbaron
authorNeerja Pancholi <npancholi@mozilla.com>
Wed, 31 Aug 2016 17:40:11 -0700
changeset 315541 409769321b119013afc6fd41345605f4a188bcf3
parent 315540 f36d1ab003c857b9861e3ca111c7e152e2a86af3
child 315542 d596d23a7efe561c6fed90466d488d5a36fbc839
push id30751
push usercbook@mozilla.com
push dateThu, 29 Sep 2016 09:43:23 +0000
treeherdermozilla-central@b67dc49095dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1299012
milestone52.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 1299012 - Fix import-tests.py to avoid breaking three multicol reftests r=dbaron MozReview-Commit-ID: 7g3ckcE2rnx
layout/reftests/w3c-css/import-tests.py
--- a/layout/reftests/w3c-css/import-tests.py
+++ b/layout/reftests/w3c-css/import-tests.py
@@ -246,18 +246,19 @@ def copy_and_prefix(test, aSourceFileNam
         searchRegex = "\s*<style\s*"
 
         if not isSupportFile and not ahemFontAdded and 'ahem' in gTestFlags[test] and re.search(searchRegex, line):
             # First put our ahem font declation before the first <style>
             # element
             newFile.write(AHEM_DECL_HTML if is_html(aDestFileName) else AHEM_DECL_XML)
             ahemFontAdded = True
 
-        for rule in aProps:
-            replacementLine = replacementLine.replace(rule, "-moz-" + rule)
+        for prop in aProps:
+            replacementLine = re.sub(r"([^-#]|^)" + prop + r"\b", r"\1-moz-" + prop, replacementLine)
+
         newFile.write(replacementLine)
 
     newFile.close()
     unPrefixedFile.close()
 
 def read_options():
     global gArgs, gOptions
     op = OptionParser()