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

Side by Side Diff: chrome/test/data/webui/certificate_viewer_dialog_test.js

Issue 10873038: Replacing WebUIBindings use of CPPBoundClass with v8::Extension. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Using typeof == "function" Created 8 years 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698