Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: chrome/test/data/webui/certificate_viewer_dialog_test.js

Issue 10382145: Fix for broken CertificateViewerUITest.testDetails. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: addEventListener() requires 'true' for useCapture argument. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/certificate_viewer.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/certificate_viewer_dialog_test.js
diff --git a/chrome/test/data/webui/certificate_viewer_dialog_test.js b/chrome/test/data/webui/certificate_viewer_dialog_test.js
index 4ed9b0b26ed766711ae22516f99046dfddf28a8d..ad904956391bb4facbc25eaeaecac1b1938e2f49 100644
--- a/chrome/test/data/webui/certificate_viewer_dialog_test.js
+++ b/chrome/test/data/webui/certificate_viewer_dialog_test.js
@@ -6,7 +6,7 @@
* Test fixture for generated tests.
* @extends {testing.Test}
*/
-function CertificateViewerUITest() {};
+function CertificateViewerUITest() {}
CertificateViewerUITest.prototype = {
__proto__: testing.Test.prototype,
@@ -31,7 +31,7 @@ CertificateViewerUITest.prototype = {
* Test fixture for asynchronous tests.
* @extends {CertificateViewerUITest}
*/
-function CertificateViewerUITestAsync() {};
+function CertificateViewerUITestAsync() {}
CertificateViewerUITestAsync.prototype = {
__proto__: CertificateViewerUITest.prototype,
@@ -44,7 +44,7 @@ CertificateViewerUITestAsync.prototype = {
// Certificate viewer UI tests are disabled on platforms with native certificate
// viewers.
GEN('#include "chrome/test/data/webui/certificate_viewer_ui_test-inl.h"');
-GEN('')
+GEN('');
// Constructors and destructors must be provided in .cc to prevent clang errors.
GEN('CertificateViewerUITest::CertificateViewerUITest() {}');
@@ -68,9 +68,8 @@ TEST_F('CertificateViewerUITest', 'testCN', function() {
* Test the details pane of the certificate viewer. This verifies that a
* certificate in the chain can be selected to view the fields. And that fields
* can be selected to view their values.
- * TODO(flackr,kgr): Re-enable this (http://crbug.com/127732).
*/
-TEST_F('CertificateViewerUITestAsync', 'DISABLED_testDetails', function() {
+TEST_F('CertificateViewerUITestAsync', 'testDetails', function() {
var certHierarchy = $('hierarchy');
var certFields = $('cert-fields');
var certFieldVal = $('cert-field-value');
@@ -78,9 +77,13 @@ TEST_F('CertificateViewerUITestAsync', 'DISABLED_testDetails', function() {
// There must be at least one certificate in the hierarchy.
assertLT(0, certHierarchy.childNodes.length);
+ // Select the second tab, causing its data to be loaded if needed.
+ $('tabbox').selectedIndex = 1;
+
// Select the first certificate on the chain and ensure the details show up.
// Override the receive certificate function to catch when fields are
// loaded.
+ certHierarchy.selectedItem = null;
var getCertificateFields = cert_viewer.getCertificateFields;
cert_viewer.getCertificateFields = this.continueTest(WhenTestDone.ALWAYS,
function(certFieldDetails) {
« no previous file with comments | « chrome/browser/resources/certificate_viewer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698