Merge branch 'develop' into reorder

This commit is contained in:
Gaël Métais
2015-05-31 19:02:40 +02:00
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -38,7 +38,7 @@ var jsExecutionTransformer = function() {
javascriptExecutionTree = JSON.parse(data.toolsResults.phantomas.offenders.javascriptExecutionTree[0]);
if (javascriptExecutionTree.children) {
javascriptExecutionTree.children.forEach(function(node) {
javascriptExecutionTree.children.forEach(function(node, index) {
var contextLength = (node.data.callDetails && node.data.callDetails.context) ? node.data.callDetails.context.length : null;
@@ -90,6 +90,10 @@ var jsExecutionTransformer = function() {
break;
}
}
// Fix rare bug when domComplete was never triggered
if (index === javascriptExecutionTree.children.length - 1 && !javascriptExecutionTree.data.domComplete) {
javascriptExecutionTree.data.domComplete = node.data.timestamp + 1000;
}
// Transform domPaths into objects
changeListOfDomPaths(node);
+1 -1
View File
@@ -76,7 +76,7 @@ describe('weightChecker', function() {
newEntry.weightCheck.bodySize.should.equal(93636);
newEntry.weightCheck.uncompressedSize.should.equal(newEntry.weightCheck.bodySize);
newEntry.weightCheck.isCompressed.should.equal(false);
newEntry.weightCheck.headersSize.should.be.above(300).and.below(350);
newEntry.weightCheck.headersSize.should.be.above(200).and.below(400);
newEntry.weightCheck.body.should.have.string('1.8.3');
done();