| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * TestFixture for Invalidations WebUI testing. | 6 * TestFixture for Invalidations WebUI testing. |
| 7 * @extends {testing.Test} | 7 * @extends {testing.Test} |
| 8 * @constructor | 8 * @constructor |
| 9 **/ | 9 */ |
| 10 function InvalidationsWebUITest() {} | 10 function InvalidationsWebUITest() {} |
| 11 | 11 |
| 12 InvalidationsWebUITest.prototype = { | 12 InvalidationsWebUITest.prototype = { |
| 13 __proto__: testing.Test.prototype, | 13 __proto__: testing.Test.prototype, |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Browse to the Invalidations page. | 16 * Browse to the Invalidations page. |
| 17 **/ | 17 */ |
| 18 browsePreload: 'chrome://invalidations', | 18 browsePreload: 'chrome://invalidations', |
| 19 runAccessibilityChecks: false, | 19 runAccessibilityChecks: false, |
| 20 accessibilityIssuesAreErrors: false | 20 accessibilityIssuesAreErrors: false |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // Test that registering an invalidations appears properly on the textarea. | 23 // Test that registering an invalidations appears properly on the textarea. |
| 24 TEST_F('InvalidationsWebUITest', 'testRegisteringNewInvalidation', function() { | 24 TEST_F('InvalidationsWebUITest', 'testRegisteringNewInvalidation', function() { |
| 25 var invalidationsLog = $('invalidations-log'); | 25 var invalidationsLog = $('invalidations-log'); |
| 26 var invalidation = [{ | 26 var invalidation = [{ |
| 27 isUnknownVersion: 'true', | 27 isUnknownVersion: 'true', |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 expectEquals(text().indexOf('FakeApi'), -1); | 113 expectEquals(text().indexOf('FakeApi'), -1); |
| 114 expectNotEquals(text().indexOf('FakeClient'), -1); | 114 expectNotEquals(text().indexOf('FakeClient'), -1); |
| 115 }); | 115 }); |
| 116 | 116 |
| 117 // Test that an object showing internal state is correctly displayed. | 117 // Test that an object showing internal state is correctly displayed. |
| 118 TEST_F('InvalidationsWebUITest', 'testUpdatingInternalDisplay', function() { | 118 TEST_F('InvalidationsWebUITest', 'testUpdatingInternalDisplay', function() { |
| 119 var newDetailedStatus = {MessagesSent: 1}; | 119 var newDetailedStatus = {MessagesSent: 1}; |
| 120 chrome.invalidations.updateDetailedStatus(newDetailedStatus); | 120 chrome.invalidations.updateDetailedStatus(newDetailedStatus); |
| 121 expectEquals( $('internal-display').value, '{\n \"MessagesSent\": 1\n}'); | 121 expectEquals( $('internal-display').value, '{\n \"MessagesSent\": 1\n}'); |
| 122 }); | 122 }); |
| OLD | NEW |