Jacek Caban (@jacek) commented about dlls/mshtml/tests/es5.js:
})();
});
+sync_test("perf toJSON", function() {
- var tests = [
[ "performance.timing", "connectEnd", "connectStart", "domComplete", "domContentLoadedEventEnd",
"domContentLoadedEventStart", "domInteractive", "domLoading", "domainLookupEnd", "domainLookupStart",
"fetchStart", "loadEventEnd", "loadEventStart", "msFirstPaint", "navigationStart", "redirectEnd",
"redirectStart", "requestStart", "responseEnd", "responseStart", "unloadEventEnd", "unloadEventStart" ]
- ];
- for(var i = 0; i < tests.length; i++) {
var desc, name = tests[i][0], obj = eval("window." + name), json;
Please don't use `eval` like this, ideally at all. You could just unquote the string in the first place.
Those tests could use more clean up. The whole array is not really needed, you could just use `getOwnPropertyNames` on the prototype. It would be nice to have `test_own_props`-based test in `documentmode.js`. We could then just depend on it doing the right thing here.