Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1553)

Unified Diff: Tools/GardeningServer/ui/test/ct-results-by-builder-tests.html

Issue 459463003: Convert moar Sheriff-o-Matic tests to Polymer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: forgot to add lib/network-simulator.html Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/test/ct-results-by-builder-tests.html
diff --git a/Tools/GardeningServer/ui/ct-results-by-builder-tests.html b/Tools/GardeningServer/ui/test/ct-results-by-builder-tests.html
similarity index 15%
rename from Tools/GardeningServer/ui/ct-results-by-builder-tests.html
rename to Tools/GardeningServer/ui/test/ct-results-by-builder-tests.html
index ba811b18a876b1a12a812a68283ad786a70fec21..dad253024b5e41c545f0749dfa90f9be620b93ba 100644
--- a/Tools/GardeningServer/ui/ct-results-by-builder-tests.html
+++ b/Tools/GardeningServer/ui/test/ct-results-by-builder-tests.html
@@ -4,58 +4,68 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<link rel="import" href="ct-results-by-builder.html">
+<link rel="import" href="../ct-results-by-builder.html">
<script>
(function () {
+var assert = chai.assert;
+
var kExampleFailure = {
- "testName": "inspector/console/console-viewport-selection.html",
- "resultNodesByBuilder": {
- "WebKit Mac10.6 (dbg)": {
- "actual": "IMAGE",
- },
- "WebKit Linux (dbg)": {
- "actual": "TEXT",
- },
+ "testName": "inspector/console/console-viewport-selection.html",
+ "resultNodesByBuilder": {
+ "WebKit Mac10.6 (dbg)": {
+ "actual": "IMAGE",
+ },
+ "WebKit Linux (dbg)": {
+ "actual": "TEXT",
},
- "oldestFailingRevision": 177164,
- "newestPassingRevision": 177165,
+ },
+ "oldestFailingRevision": 177164,
+ "newestPassingRevision": 177165,
};
-module("ct-results-by-builder");
-
-asyncTest("basic", 9, function() {
- // FIXME: Remove this override when ct-results-detail is fixed to not use
- // results.fetchResultsURLs.
- var oldFetchResultsURLs = results.fetchResultsURLs;
- results.fetchResultsURLs = function() { return Promise.resolve([]); };
+describe('ct-results-by-builder', function() {
+ var resultsByBuilder;
+ var oldFetchResultsURLs;
- var resultsByBuilder = document.createElement('ct-results-by-builder');
- resultsByBuilder.failure = kExampleFailure;
+ beforeEach(function(done) {
+ // FIXME: Remove this override when ct-results-detail is fixed to not use
+ // results.fetchResultsURLs.
+ oldFetchResultsURLs = results.fetchResultsURLs;
+ results.fetchResultsURLs = function() { return Promise.resolve([]); };
- requestAnimationFrame(function() {
- var tabs = resultsByBuilder.shadowRoot.querySelectorAll('paper-tab');
- equal(tabs.length, 2);
- equal(tabs[0].textContent, 'WebKit Linux (dbg)');
- equal(tabs[1].textContent, 'WebKit Mac10.6 (dbg)');
+ resultsByBuilder = document.createElement('ct-results-by-builder');
+ resultsByBuilder.failure = kExampleFailure;
- var detail = resultsByBuilder.shadowRoot.querySelectorAll('ct-results-detail');
- equal(detail.length, 1);
- equal(detail[0].failure.testName, 'inspector/console/console-viewport-selection.html');
- equal(detail[0].builder, 'WebKit Linux (dbg)');
+ setTimeout(done);
+ });
- resultsByBuilder.shadowRoot.querySelector('paper-tabs').selected = 1;
+ afterEach(function() {
+ results.fetchResultsURLs = oldFetchResultsURLs;
+ });
- requestAnimationFrame(function() {
- results.fetchResultsURLs = oldFetchResultsURLs;
+ describe('results UI', function() {
+ it('should show details in each tab', function(done) {
+ var tabs = resultsByBuilder.shadowRoot.querySelectorAll('paper-tab');
+ assert.lengthOf(tabs, 2);
+ assert.equal(tabs[0].textContent, 'WebKit Linux (dbg)');
+ assert.equal(tabs[1].textContent, 'WebKit Mac10.6 (dbg)');
var detail = resultsByBuilder.shadowRoot.querySelectorAll('ct-results-detail');
- equal(detail.length, 1);
- equal(detail[0].failure.testName, 'inspector/console/console-viewport-selection.html');
- equal(detail[0].builder, 'WebKit Mac10.6 (dbg)');
+ assert.lengthOf(detail, 1);
+ assert.equal(detail[0].failure.testName, 'inspector/console/console-viewport-selection.html');
+ assert.equal(detail[0].builder, 'WebKit Linux (dbg)');
+
+ resultsByBuilder.shadowRoot.querySelector('paper-tabs').selected = 1;
- start();
+ setTimeout(function() {
+ var detail = resultsByBuilder.shadowRoot.querySelectorAll('ct-results-detail');
+ assert.lengthOf(detail, 1);
+ assert.equal(detail[0].failure.testName, 'inspector/console/console-viewport-selection.html');
+ assert.equal(detail[0].builder, 'WebKit Mac10.6 (dbg)');
+ done();
+ });
});
});
});
« no previous file with comments | « Tools/GardeningServer/ui/test/ct-party-time-tests.html ('k') | Tools/GardeningServer/ui/test/ct-results-comparison-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698