From aee0905ea53531b5dc6d236b90b71b710ed86e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Tue, 6 Jan 2015 16:40:33 +0100 Subject: [PATCH] Tune DOM complexity score --- lib/metadata/policies.js | 6 +++--- test/core/yellowlabtoolsTest.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/metadata/policies.js b/lib/metadata/policies.js index 91d3f4a..b2b70fd 100644 --- a/lib/metadata/policies.js +++ b/lib/metadata/policies.js @@ -6,8 +6,8 @@ var policies = { "label": "DOM elements count", "message": "

A high number of DOM elements means a lot of work for the browser to render the page.

It also slows down JavaScript DOM queries, as there are more elements to search through.

", "isOkThreshold": 1000, - "isBadThreshold": 3000, - "isAbnormalThreshold": 5000 + "isBadThreshold": 2500, + "isAbnormalThreshold": 4000 }, "DOMelementMaxDepth": { "tool": "phantomas", @@ -15,7 +15,7 @@ var policies = { "message": "

A deep DOM makes the CSS matching with DOM elements difficult.

It also slows down JavaScript modifications to the DOM because changing the dimensions of an element makes the browser re-calculate the dimensions of it's parents. Same thing for JavaScript events, that bubble up to the document root.

", "isOkThreshold": 10, "isBadThreshold": 20, - "isAbnormalThreshold": 30 + "isAbnormalThreshold": 28 }, "iframesCount": { "tool": "phantomas", diff --git a/test/core/yellowlabtoolsTest.js b/test/core/yellowlabtoolsTest.js index 952abb2..2b5632c 100644 --- a/test/core/yellowlabtoolsTest.js +++ b/test/core/yellowlabtoolsTest.js @@ -30,7 +30,7 @@ describe('yellowlabtools', function() { }); }); - it('should succeeds on simple-page.html', function(done) { + it('should succeed on simple-page.html', function(done) { this.timeout(15000); // Check if console.log is called @@ -65,7 +65,7 @@ describe('yellowlabtools', function() { "message": "

A deep DOM makes the CSS matching with DOM elements difficult.

It also slows down JavaScript modifications to the DOM because changing the dimensions of an element makes the browser re-calculate the dimensions of it's parents. Same thing for JavaScript events, that bubble up to the document root.

", "isOkThreshold": 10, "isBadThreshold": 20, - "isAbnormalThreshold": 30 + "isAbnormalThreshold": 28 }, "value": 1, "bad": false,