| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 cr.define('settings_privacy_page', function() { | 5 cr.define('settings_privacy_page', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {TestBrowserProxy} | 8 * @extends {TestBrowserProxy} |
| 9 * @implements {settings.PrivacyPageBrowserProxy} | 9 * @implements {settings.PrivacyPageBrowserProxy} |
| 10 */ | 10 */ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 testBrowserProxy = new TestClearBrowsingDataBrowserProxy(); | 91 testBrowserProxy = new TestClearBrowsingDataBrowserProxy(); |
| 92 settings.ClearBrowsingDataBrowserProxyImpl.instance_ = testBrowserProxy; | 92 settings.ClearBrowsingDataBrowserProxyImpl.instance_ = testBrowserProxy; |
| 93 PolymerTest.clearBody(); | 93 PolymerTest.clearBody(); |
| 94 element = document.createElement('settings-clear-browsing-data-dialog'); | 94 element = document.createElement('settings-clear-browsing-data-dialog'); |
| 95 document.body.appendChild(element); | 95 document.body.appendChild(element); |
| 96 }); | 96 }); |
| 97 | 97 |
| 98 teardown(function() { element.remove(); }); | 98 teardown(function() { element.remove(); }); |
| 99 | 99 |
| 100 test('ClearBrowsingDataTap', function() { | 100 test('ClearBrowsingDataTap', function() { |
| 101 element.open(); | |
| 102 assertTrue(element.$.dialog.opened); | 101 assertTrue(element.$.dialog.opened); |
| 103 | 102 |
| 104 var cancelButton = element.$$('.cancel-button'); | 103 var cancelButton = element.$$('.cancel-button'); |
| 105 assertTrue(!!cancelButton); | 104 assertTrue(!!cancelButton); |
| 106 var actionButton = element.$$('.action-button'); | 105 var actionButton = element.$$('.action-button'); |
| 107 assertTrue(!!actionButton); | 106 assertTrue(!!actionButton); |
| 108 var spinner = element.$$('paper-spinner'); | 107 var spinner = element.$$('paper-spinner'); |
| 109 assertTrue(!!spinner); | 108 assertTrue(!!spinner); |
| 110 | 109 |
| 111 assertFalse(cancelButton.disabled); | 110 assertFalse(cancelButton.disabled); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 141 | 140 |
| 142 return { | 141 return { |
| 143 registerTests: function() { | 142 registerTests: function() { |
| 144 if (cr.isMac || cr.isWin) | 143 if (cr.isMac || cr.isWin) |
| 145 registerNativeCertificateManagerTests(); | 144 registerNativeCertificateManagerTests(); |
| 146 | 145 |
| 147 registerClearBrowsingDataTests(); | 146 registerClearBrowsingDataTests(); |
| 148 }, | 147 }, |
| 149 }; | 148 }; |
| 150 }); | 149 }); |
| OLD | NEW |