From 58864f469e29ce2051fc465d5e7194f108d30a4a Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Sun, 1 Mar 2015 09:51:33 +0900 Subject: [PATCH] Bug 1108382 - Part 12: Do not use non-standard flag argument of String.prototype.replace in testing/web-platform/tests/. r=jgriffin --- testing/web-platform/tests/ambient-light/idlharness.html | 2 +- testing/web-platform/tests/proximity/idlharness.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/web-platform/tests/ambient-light/idlharness.html b/testing/web-platform/tests/ambient-light/idlharness.html index 077126e481a..d765e0410fd 100644 --- a/testing/web-platform/tests/ambient-light/idlharness.html +++ b/testing/web-platform/tests/ambient-light/idlharness.html @@ -45,7 +45,7 @@ interface DeviceLightEvent : Event { "use strict"; var idl_array = new IdlArray(); // replace 'EventHandler' and 'unrestricted double' unrecognised by idlharness.js - var idls = document.getElementById('idl').textContent.replace('EventHandler', 'Function?', 'g').replace('unrestricted double', 'double', 'g'); + var idls = document.getElementById('idl').textContent.replace(/EventHandler/g, 'Function?').replace(/unrestricted double/g, 'double'); idl_array.add_untested_idls(document.getElementById('untested_idl').textContent); idl_array.add_idls(idls); diff --git a/testing/web-platform/tests/proximity/idlharness.html b/testing/web-platform/tests/proximity/idlharness.html index 0da304b9e65..a84b54af462 100644 --- a/testing/web-platform/tests/proximity/idlharness.html +++ b/testing/web-platform/tests/proximity/idlharness.html @@ -59,7 +59,7 @@ interface UserProximityEvent : Event { "use strict"; var idl_array = new IdlArray(); // replace 'EventHandler' and 'unrestricted double' unrecognised by idlharness.js - var idls = document.getElementById('idl').textContent.replace('EventHandler', 'Function?', 'g').replace('unrestricted double', 'double', 'g'); + var idls = document.getElementById('idl').textContent.replace(/EventHandler/g, 'Function?').replace(/unrestricted double/g, 'double'); idl_array.add_untested_idls(document.getElementById('untested_idl').textContent); idl_array.add_idls(idls);