Home | History | Annotate | Download | only in base

Lines Matching defs:domain_state

145   TransportSecurityState::DomainState domain_state;
149 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
150 domain_state.expiry = expiry;
151 state->EnableHost("google.com", domain_state);
152 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
158 TransportSecurityState::DomainState domain_state;
162 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
163 domain_state.expiry = expiry;
164 state->EnableHost("GOOgle.coM", domain_state);
165 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
171 TransportSecurityState::DomainState domain_state;
175 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "GOOgle.coM", true));
176 domain_state.expiry = expiry;
177 state->EnableHost("google.com", domain_state);
178 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "GOOgle.coM", true));
184 TransportSecurityState::DomainState domain_state;
188 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
189 domain_state.expiry = expiry;
190 domain_state.include_subdomains = true;
191 state->EnableHost("google.com", domain_state);
192 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
193 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "foo.google.com", true));
194 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
197 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
200 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "com", true));
217 TransportSecurityState::DomainState domain_state;
221 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
222 domain_state.mode = TransportSecurityState::DomainState::MODE_STRICT;
223 domain_state.expiry = expiry;
224 domain_state.include_subdomains = true;
225 state->EnableHost("google.com", domain_state);
232 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
233 EXPECT_EQ(domain_state.mode, TransportSecurityState::DomainState::MODE_STRICT);
234 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "foo.google.com", true));
235 EXPECT_EQ(domain_state.mode, TransportSecurityState::DomainState::MODE_STRICT);
236 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
239 EXPECT_EQ(domain_state.mode, TransportSecurityState::DomainState::MODE_STRICT);
240 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
243 EXPECT_EQ(domain_state.mode, TransportSecurityState::DomainState::MODE_STRICT);
244 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "com", true));
251 TransportSecurityState::DomainState domain_state;
255 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
256 domain_state.mode = TransportSecurityState::DomainState::MODE_OPPORTUNISTIC;
257 domain_state.expiry = expiry;
258 state->EnableHost("google.com", domain_state);
265 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
266 EXPECT_EQ(domain_state.mode,
274 TransportSecurityState::DomainState domain_state;
279 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
280 domain_state.mode = TransportSecurityState::DomainState::MODE_STRICT;
281 domain_state.expiry = expiry;
282 state->EnableHost("google.com", domain_state);
285 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
287 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
294 TransportSecurityState::DomainState domain_state;
297 domain_state.mode = TransportSecurityState::DomainState::MODE_STRICT;
298 domain_state.expiry = expiry;
299 state->EnableHost("google.com", domain_state);
301 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "google.com", true));
302 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "example.com", true));
304 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "google.com", true));
339 TransportSecurityState::DomainState domain_state;
341 paypal, true, &domain_state));
343 www_paypal, true, &domain_state));
344 EXPECT_FALSE(domain_state.include_subdomains);
346 a_www_paypal, true, &domain_state));
348 abc_paypal, true, &domain_state));
350 example, true, &domain_state));
352 aypal, true, &domain_state));
358 TransportSecurityState::DomainState domain_state;
359 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "paypal.com", true));
360 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.paypal.com", true));
361 EXPECT_EQ(domain_state.mode,
363 EXPECT_TRUE(domain_state.preloaded);
364 EXPECT_FALSE(domain_state.include_subdomains);
365 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "www2.paypal.com", true));
366 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
370 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "elanex.biz", true));
371 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.elanex.biz", true));
372 EXPECT_EQ(domain_state.mode,
374 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "foo.elanex.biz", true));
375 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
379 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
382 EXPECT_EQ(domain_state.mode,
384 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
387 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
391 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
394 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
397 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
401 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "neg9.org", true));
402 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "www.neg9.org", true));
404 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "riseup.net", true));
405 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "foo.riseup.net", true));
407 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "factor.cc", true));
408 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "www.factor.cc", true));
410 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
413 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
416 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "id.mayfirst.org", true));
417 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
420 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
424 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
427 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
430 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
434 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
437 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
440 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
443 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
446 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
449 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
452 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "ottospora.nl", true));
453 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.ottospora.nl", true));
455 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "docs.google.com", true));
456 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "sites.google.com", true));
457 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
460 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
464 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
467 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
472 EXPECT_EQ(domain_state.domain, "market.android.com");
473 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
476 EXPECT_EQ(domain_state.domain, "market.android.com");
478 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "lastpass.com", true));
479 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.lastpass.com", true));
480 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
484 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "keyerror.com", true));
485 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.keyerror.com", true));
487 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
490 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
494 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "entropia.de", true));
495 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.entropia.de", true));
496 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "foo.entropia.de", true));
498 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "gmail.com", true));
499 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "www.gmail.com", true));
500 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "m.gmail.com", true));
501 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "googlemail.com", true));
502 EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
505 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
508 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "gmail.com", false));
509 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "www.gmail.com", false));
510 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "m.gmail.com", false));
511 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "googlemail.com", false));
512 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
515 EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
526 TransportSecurityState::DomainState domain_state;
528 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, kLongName, true));
535 TransportSecurityState::DomainState domain_state;
536 EXPECT_FALSE(state->IsEnabledForHost(&domain_state, "example.com", false));
538 EXPECT_TRUE(domain_state.IsChainOfPublicKeysPermitted(hashes));
542 domain_state.public_key_hashes.push_back(hash);
544 EXPECT_FALSE(domain_state.IsChainOfPublicKeysPermitted(hashes));
546 EXPECT_TRUE(domain_state.IsChainOfPublicKeysPermitted(hashes));
548 EXPECT_FALSE(domain_state.IsChainOfPublicKeysPermitted(hashes));
552 domain_state.expiry = expiry;
553 state->EnableHost("example.com", domain_state);
558 EXPECT_TRUE(state->IsEnabledForHost(&domain_state, "example.com", false));
559 EXPECT_EQ(1u, domain_state.public_key_hashes.size());
560 EXPECT_TRUE(0 == memcmp(domain_state.public_key_hashes[0].data, hash.data,