Bug 1249144 - [webext] fix sorting collected frame details in webNavigation tests. r=kmag

MozReview-Commit-ID: ay5fGRGSpW

--HG--
extra : transplant_source : %AC%05%86w%18%F7Q%0B%F4%BA%7Ci%F5k.%E7%80%0Ak%B9
This commit is contained in:
Luca Greco 2016-02-19 04:09:16 +01:00
Родитель c244ff7396
Коммит 4b9a1c10fb
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -139,7 +139,11 @@ add_task(function* testWebNavigationFrames() {
"number of frames found should equal the number onCompleted events collected"); "number of frames found should equal the number onCompleted events collected");
// ordered by frameId // ordered by frameId
let sortByFrameId = (el) => el ? el.frameId : -1; let sortByFrameId = (el1, el2) => {
let val1 = el1 ? el1.frameId : -1;
let val2 = el2 ? el2.frameId : -1;
return val1 - val2;
};
collectedDetails = collectedDetails.sort(sortByFrameId); collectedDetails = collectedDetails.sort(sortByFrameId);
getAllFramesDetails = getAllFramesDetails.sort(sortByFrameId); getAllFramesDetails = getAllFramesDetails.sort(sortByFrameId);