| Index: Tools/GardeningServer/ui/ct-results-panel-tests.html
|
| diff --git a/Tools/GardeningServer/ui/ct-results-panel-tests.html b/Tools/GardeningServer/ui/ct-results-panel-tests.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e555cb1edfa10ce60482960ff2b9f75c09e3c23
|
| --- /dev/null
|
| +++ b/Tools/GardeningServer/ui/ct-results-panel-tests.html
|
| @@ -0,0 +1,134 @@
|
| +<!--
|
| +Copyright 2014 The Chromium Authors. All rights reserved.
|
| +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-panel.html">
|
| +
|
| +<script>
|
| +(function () {
|
| +
|
| +var kExampleFailures = [{
|
| + "testName": "plugins/gesture-events-scrolled.html",
|
| + "resultNodesByBuilder": {
|
| + "WebKit Win7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "time": 0.9
|
| + },
|
| + "WebKit Mac10.6 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 1.8
|
| + },
|
| + "WebKit Mac10.7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 3.2
|
| + }
|
| + },
|
| + "oldestFailingRevision": 177164,
|
| + "newestPassingRevision": 177165
|
| +}, {
|
| + "testName": "plugins/transformed-events.html",
|
| + "resultNodesByBuilder": {
|
| + "WebKit Win7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "time": 0.6
|
| + },
|
| + "WebKit Mac10.6 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 1.4
|
| + },
|
| + "WebKit Mac10.7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 3
|
| + }
|
| + },
|
| + "oldestFailingRevision": 177164,
|
| + "newestPassingRevision": 177165
|
| +}, {
|
| + "testName": "plugins/gesture-events.html",
|
| + "resultNodesByBuilder": {
|
| + "WebKit Win7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "time": 1.7
|
| + },
|
| + "WebKit Mac10.6 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 2.5
|
| + },
|
| + "WebKit Mac10.7 (dbg)": {
|
| + "expected": "PASS",
|
| + "is_unexpected": true,
|
| + "actual": "CRASH",
|
| + "has_stderr": true,
|
| + "time": 3.4
|
| + }
|
| + },
|
| + "oldestFailingRevision": 177164,
|
| + "newestPassingRevision": 177165
|
| +}];
|
| +
|
| +module("ct-results-panel");
|
| +
|
| +asyncTest("empty", 1, function() {
|
| + var panel = document.createElement('ct-results-panel');
|
| +
|
| + Platform.endOfMicrotask(function() {
|
| + var message = panel.shadowRoot.querySelector('.message');
|
| + equal(message.textContent, 'No results to display.');
|
| +
|
| + start();
|
| + });
|
| +});
|
| +
|
| +asyncTest("basic", 8, function() {
|
| + var panel = document.createElement('ct-results-panel');
|
| +
|
| + panel.failures = kExampleFailures;
|
| +
|
| + Platform.endOfMicrotask(function() {
|
| + var items = panel.shadowRoot.querySelectorAll('paper-item');
|
| + equal(items.length, 3);
|
| + equal(items[0].label, 'plugins/gesture-events-scrolled.html');
|
| + equal(items[1].label, 'plugins/transformed-events.html');
|
| + equal(items[2].label, 'plugins/gesture-events.html');
|
| +
|
| + var results = panel.shadowRoot.querySelectorAll('ct-results-by-builder');
|
| + equal(results.length, 1);
|
| + equal(results[0].failure, kExampleFailures[0]);
|
| +
|
| + panel.shadowRoot.querySelector('core-menu').selected = 2;
|
| +
|
| + Platform.endOfMicrotask(function() {
|
| + var results = panel.shadowRoot.querySelectorAll('ct-results-by-builder');
|
| + equal(results.length, 1);
|
| + equal(results[0].failure, kExampleFailures[2]);
|
| +
|
| + start();
|
| + });
|
| + });
|
| +});
|
| +
|
| +})()
|
| +</script>
|
|
|