| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * Test fixture for generated tests. | 6 * Test fixture for generated tests. |
| 7 * @extends {testing.Test} | 7 * @extends {testing.Test} |
| 8 */ | 8 */ |
| 9 function CertificateViewerUITest() {} | 9 function CertificateViewerUITest() {} |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 GEN(''); | 47 GEN(''); |
| 48 | 48 |
| 49 // Constructors and destructors must be provided in .cc to prevent clang errors. | 49 // Constructors and destructors must be provided in .cc to prevent clang errors. |
| 50 GEN('CertificateViewerUITest::CertificateViewerUITest() {}'); | 50 GEN('CertificateViewerUITest::CertificateViewerUITest() {}'); |
| 51 GEN('CertificateViewerUITest::~CertificateViewerUITest() {}'); | 51 GEN('CertificateViewerUITest::~CertificateViewerUITest() {}'); |
| 52 | 52 |
| 53 /** | 53 /** |
| 54 * Tests that the dialog opened to the correct URL. | 54 * Tests that the dialog opened to the correct URL. |
| 55 */ | 55 */ |
| 56 TEST_F('CertificateViewerUITest', 'testDialogURL', function() { | 56 TEST_F('CertificateViewerUITest', 'testDialogURL', function() { |
| 57 assertEquals(chrome.expectedUrl, window.location.href); | 57 assertEquals(chrome.getVariableValue('expectedUrl'), window.location.href); |
| 58 }); | 58 }); |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * Tests for the correct common name in the test certificate. | 61 * Tests for the correct common name in the test certificate. |
| 62 */ | 62 */ |
| 63 TEST_F('CertificateViewerUITest', 'testCN', function() { | 63 TEST_F('CertificateViewerUITest', 'testCN', function() { |
| 64 assertEquals('www.google.com', $('issued-cn').textContent); | 64 assertEquals('www.google.com', $('issued-cn').textContent); |
| 65 }); | 65 }); |
| 66 | 66 |
| 67 /** | 67 /** |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 function getElementWithValue(tree) { | 114 function getElementWithValue(tree) { |
| 115 for (var i = 0; i < tree.childNodes.length; i++) { | 115 for (var i = 0; i < tree.childNodes.length; i++) { |
| 116 var element = tree.childNodes[i]; | 116 var element = tree.childNodes[i]; |
| 117 if (element.detail && element.detail.payload && element.detail.payload.val) | 117 if (element.detail && element.detail.payload && element.detail.payload.val) |
| 118 return element; | 118 return element; |
| 119 if (element = getElementWithValue(element)) | 119 if (element = getElementWithValue(element)) |
| 120 return element; | 120 return element; |
| 121 } | 121 } |
| 122 return null; | 122 return null; |
| 123 } | 123 } |
| OLD | NEW |