| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 test('View with reftests', 2, function() { | 182 test('View with reftests', 2, function() { |
| 183 var delegate = { | 183 var delegate = { |
| 184 fetchResultsURLs: function(failureInfo) { return Promise.resolve(); } | 184 fetchResultsURLs: function(failureInfo) { return Promise.resolve(); } |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 var view = new ui.results.View(delegate); | 187 var view = new ui.results.View(delegate); |
| 188 view.setResultsByTest(kExampleReftestResults); | 188 view.setResultsByTest(kExampleReftestResults); |
| 189 view.firstResult(); | 189 view.firstResult(); |
| 190 | 190 |
| 191 equals($('.non-action-button', view).length, 1); | 191 equals($('.non-action-button', view).length, 0); |
| 192 equals($('.action', view).length, 0); | 192 equals($('.action', view).length, 0); |
| 193 }); | 193 }); |
| 194 | 194 |
| 195 asyncTest('View of timeouts', 1, function() { | 195 asyncTest('View of timeouts', 1, function() { |
| 196 var emptyPromise = Promise.resolve([]); | 196 var emptyPromise = Promise.resolve([]); |
| 197 var delegate = { | 197 var delegate = { |
| 198 fetchResultsURLs: function(failureInfo) { return emptyPromise; } | 198 fetchResultsURLs: function(failureInfo) { return emptyPromise; } |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 var view = new ui.results.View(delegate); | 201 var view = new ui.results.View(delegate); |
| 202 view.setResultsByTest(kExampleResultsWithTimeoutByTest); | 202 view.setResultsByTest(kExampleResultsWithTimeoutByTest); |
| 203 view.firstResult(); | 203 view.firstResult(); |
| 204 emptyPromise.then(function() { | 204 emptyPromise.then(function() { |
| 205 equals($('.results-grid', view).html(), 'No results to display.'); | 205 equals($('.results-grid', view).html(), 'No results to display.'); |
| 206 start(); | 206 start(); |
| 207 }); | 207 }); |
| 208 }); | 208 }); |
| 209 | 209 |
| 210 })(); | 210 })(); |
| OLD | NEW |