Teach TestFailures how to load, parse, and interpret NRWT test results
[WebKit-https.git] / Tools / BuildSlaveSupport / build.webkit.org-config / public_html / TestFailures / Utilities.js
index f9e165e48f3608fabef123f2a9290bca35cd9951..2c960e6e2683ff22f25cbd9719cba88390345cf4 100644 (file)
@@ -114,6 +114,10 @@ function sorted(array, sortFunction) {
     return newArray;
 }
 
+Array.prototype.contains = function(value) {
+    return this.indexOf(value) >= 0;
+}
+
 Array.prototype.findFirst = function(predicate) {
     for (var i = 0; i < this.length; ++i) {
         if (predicate(this[i]))
@@ -145,3 +149,7 @@ Node.prototype.removeAllChildren = function() {
     while (this.firstChild)
         this.removeChild(this.firstChild);
 }
+
+String.prototype.contains = function(substring) {
+    return this.indexOf(substring) >= 0;
+}