Remove the option for animating using setInterval from the graphics benchmark
[WebKit-https.git] / PerformanceTests / Animometer / tests / resources / utilities.js
1 window.Utilities =
2 {
3     _parse: function(str, sep)
4     {
5         var output = {};
6         str.split(sep).forEach(function(part) {
7             var item = part.split("=");
8             var value = decodeURIComponent(item[1]);
9             if (value[0] == "'" )
10                 output[item[0]] = value.substr(1, value.length - 2);
11             else
12                 output[item[0]] = value;                
13           });
14         return output;
15     },
16     
17     parseParameters: function()
18     {
19         return this._parse(window.location.search.substr(1), "&");
20     },
21     
22     parseArguments: function(str)
23     {
24         return this._parse(str, " ");
25     },
26     
27     extendObject: function(obj1, obj2)
28     {
29         for (var attrname in obj2)
30             obj1[attrname] = obj2[attrname];
31         return obj1;
32     },
33     
34     copyObject: function(obj)
35     {
36         return this.extendObject({}, obj);
37     },
38     
39     mergeObjects: function(obj1, obj2)
40     {
41         return this.extendObject(this.copyObject(obj1), obj2);
42     }
43 }