Fix exception when running Sheriff-o-Matic tests.

Exception is caused by embedded-flakiness-dashboard. The iframe needs to
be added to the DOM to expose the contentWindow property.

By adding captureConsole: true to karma.conf.js, we will also see these
errors in the karma test runner in the future.

BUG=404415
R=ojan@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/484753002

git-svn-id: svn://svn.chromium.org/blink/trunk@180485 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b074a82b
...@@ -17,7 +17,8 @@ module.exports = function(config) { ...@@ -17,7 +17,8 @@ module.exports = function(config) {
ui: 'bdd', ui: 'bdd',
checkLeaks: true, checkLeaks: true,
globals: ['net'] globals: ['net']
} },
captureConsole: true
}, },
// list of files / patterns to load in the browser // list of files / patterns to load in the browser
......
...@@ -30,11 +30,11 @@ describe('ct-commit-list', function() { ...@@ -30,11 +30,11 @@ describe('ct-commit-list', function() {
expanded: false } expanded: false }
]; ];
var CommitList = Object.create(Object); list.commitList = {
CommitList.prototype.repositories = function() { repositories: function() {
return repos; return repos;
}
}; };
list.commitList = CommitList;
setTimeout(done); setTimeout(done);
}); });
......
...@@ -97,12 +97,19 @@ describe('ct-results-panel', function() { ...@@ -97,12 +97,19 @@ describe('ct-results-panel', function() {
beforeEach(function(done) { beforeEach(function(done) {
panel = document.createElement('ct-results-panel'); panel = document.createElement('ct-results-panel');
panel.hidden = true;
document.body.appendChild(panel);
if (failures) if (failures)
panel.failures = failures; panel.failures = failures;
setTimeout(done); setTimeout(done);
}); });
afterEach(function() {
document.body.removeChild(panel);
});
describe('empty', function() { describe('empty', function() {
before(function() { before(function() {
failures = undefined; failures = undefined;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment