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. ...@@ -32,7 +32,8 @@ found in the LICENSE file.
}, },
testChanged: function() { 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,17 +12,33 @@ found in the LICENSE file. ...@@ -12,17 +12,33 @@ found in the LICENSE file.
var assert = chai.assert; var assert = chai.assert;
describe('ct-embedded-flakiness-dashboard', function() { describe('ct-embedded-flakiness-dashboard', function() {
it('should point the iframe to the dashboard', function(done) {
var failure = new CTFailure('foo_tests', 'foo/bar.html');
var tree = "blink";
var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
embeddedFlakinessDashboard.test = failure;
embeddedFlakinessDashboard.tree = tree;
setTimeout(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";
embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
embeddedFlakinessDashboard.hidden = true;
embeddedFlakinessDashboard.test = failure;
embeddedFlakinessDashboard.tree = tree;
document.body.appendChild(embeddedFlakinessDashboard);
var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe'); var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe');
assert.equal(iframe.src, failure.embeddedFlakinessDashboardURL(tree)); iframe.addEventListener('load', function() {
done(); assert.include(iframe.contentWindow.location.href,
failure.embeddedFlakinessDashboardURL(tree));
done();
});
}); });
}); });
......
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