Don't add extra items to sheriff-o-matic history.

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

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

git-svn-id: svn://svn.chromium.org/blink/trunk@180402 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent af3e6e52
......@@ -32,7 +32,8 @@ found in the LICENSE file.
},
testChanged: function() {
this.$.iframe.src = this.test.embeddedFlakinessDashboardURL(this.tree);
// Use location.replace so we don't create extraneous history events.
this.$.iframe.contentWindow.location.replace(this.test.embeddedFlakinessDashboardURL(this.tree));
},
});
......
......@@ -12,19 +12,35 @@ found in the LICENSE file.
var assert = chai.assert;
describe('ct-embedded-flakiness-dashboard', function() {
describe('iframe location', function() {
var embeddedFlakinessDashboard;
after(function() {
document.body.removeChild(embeddedFlakinessDashboard);
});
it('should point the iframe to the dashboard', function(done) {
var failure = new CTFailure('foo_tests', 'foo/bar.html');
failure.embeddedFlakinessDashboardURL = function(tree) {
return 'placeholder.html?' + this.flakinessDashboardURL(tree) + '&showChrome=false';
}
var tree = "blink";
var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
embeddedFlakinessDashboard.hidden = true;
embeddedFlakinessDashboard.test = failure;
embeddedFlakinessDashboard.tree = tree;
document.body.appendChild(embeddedFlakinessDashboard);
setTimeout(function() {
var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe');
assert.equal(iframe.src, failure.embeddedFlakinessDashboardURL(tree));
iframe.addEventListener('load', function() {
assert.include(iframe.contentWindow.location.href,
failure.embeddedFlakinessDashboardURL(tree));
done();
});
});
});
it('should respond to heightChanged', function(done) {
var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
......
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