1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 07:37:57 +02:00

Prevent browser console errors during testing

The `Driver._cleanup` method is removing all stylesheets between test runs, which causes "TypeError: styleElement.parentNode is null" console errors in `FontLoader.clear`.

As can also be seen during various tests, some of the changes I made in PR 7972 unfortunately causes console errors.
It seems that I didn't test this properly, since it *should* have been obvious to me that while tests are triggered using Node.js, the files in question are run within the *browser*.
My apologies for not testing this thoroughly, and for causing unnecessary churn in the code!
This commit is contained in:
Jonas Jenwald 2017-02-05 13:23:42 +01:00
parent cae8d97c4c
commit e416032b38
4 changed files with 9 additions and 13 deletions

View file

@ -1,5 +1,6 @@
'use strict';
// eslint-disable-next-line no-unused-vars
var TestReporter = function(browser, appPath) {
function send(action, json, cb) {
var r = new XMLHttpRequest();
@ -74,5 +75,3 @@ var TestReporter = function(browser, appPath) {
setTimeout(sendQuitRequest, 500);
};
};
exports.TestReporter = TestReporter;