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 // Include test fixture. | 5 // Include test fixture. |
6 GEN_INCLUDE(['net_internals_test.js']); | 6 GEN_INCLUDE(['net_internals_test.js']); |
7 | 7 |
8 // Anonymous namespace | 8 // Anonymous namespace |
9 (function() { | 9 (function() { |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 expectEquals(QueryResultType.NOT_FOUND, this.queryResultType_); | 115 expectEquals(QueryResultType.NOT_FOUND, this.queryResultType_); |
116 expectEquals('Not found', $(HSTSView.QUERY_OUTPUT_DIV_ID).innerText); | 116 expectEquals('Not found', $(HSTSView.QUERY_OUTPUT_DIV_ID).innerText); |
117 }, | 117 }, |
118 | 118 |
119 /** | 119 /** |
120 * Checks successful results. | 120 * Checks successful results. |
121 * @param {object} result Results from the query. | 121 * @param {object} result Results from the query. |
122 */ | 122 */ |
123 checkSuccess_: function(result) { | 123 checkSuccess_: function(result) { |
124 expectEquals(QueryResultType.SUCCESS, this.queryResultType_); | 124 expectEquals(QueryResultType.SUCCESS, this.queryResultType_); |
125 expectEquals(this.stsSubdomains_, result.sts_subdomains); | 125 expectEquals(this.stsSubdomains_, result.dynamic_sts_include_subdomains); |
126 expectEquals(this.pkpSubdomains_, result.pkp_subdomains); | 126 expectEquals(this.pkpSubdomains_, result.dynamic_pkp_include_subdomains); |
127 expectLE(this.stsObserved_, result.sts_observed); | 127 expectLE(this.stsObserved_, result.dynamic_sts_observed); |
128 expectLE(this.pkpObserved_, result.pkp_observed); | 128 expectLE(this.pkpObserved_, result.dynamic_pkp_observed); |
129 | 129 |
130 // |public_key_hashes| is an old synonym for what is now | 130 // |public_key_hashes| is an old synonym for what is now |
131 // |preloaded_spki_hashes|, which in turn is a legacy synonym for | 131 // |preloaded_spki_hashes|, which in turn is a legacy synonym for |
132 // |static_spki_hashes|. Look for all three, and also for | 132 // |static_spki_hashes|. Look for all three, and also for |
133 // |dynamic_spki_hashes|. | 133 // |dynamic_spki_hashes|. |
134 if (typeof result.public_key_hashes === 'undefined') | 134 if (typeof result.public_key_hashes === 'undefined') |
135 result.public_key_hashes = ''; | 135 result.public_key_hashes = ''; |
136 if (typeof result.preloaded_spki_hashes === 'undefined') | 136 if (typeof result.preloaded_spki_hashes === 'undefined') |
137 result.preloaded_spki_hashes = ''; | 137 result.preloaded_spki_hashes = ''; |
138 if (typeof result.static_spki_hashes === 'undefined') | 138 if (typeof result.static_spki_hashes === 'undefined') |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 VALID_HASH, QueryResultType.SUCCESS)); | 388 VALID_HASH, QueryResultType.SUCCESS)); |
389 taskQueue.addTask(new DeleteTask('somewhere.com', QueryResultType.NOT_FOUND)); | 389 taskQueue.addTask(new DeleteTask('somewhere.com', QueryResultType.NOT_FOUND)); |
390 taskQueue.addTask(new QueryTask('somewhereelse.com', true, true, now, now, '', | 390 taskQueue.addTask(new QueryTask('somewhereelse.com', true, true, now, now, '', |
391 QueryResultType.SUCCESS)); | 391 QueryResultType.SUCCESS)); |
392 taskQueue.addTask(new DeleteTask('somewhereelse.com', | 392 taskQueue.addTask(new DeleteTask('somewhereelse.com', |
393 QueryResultType.NOT_FOUND)); | 393 QueryResultType.NOT_FOUND)); |
394 taskQueue.run(true); | 394 taskQueue.run(true); |
395 }); | 395 }); |
396 | 396 |
397 })(); // Anonymous namespace | 397 })(); // Anonymous namespace |
OLD | NEW |