blob: 47af3ee9b2d13996e155f8c3ad8ce3ca742c147d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/ssl_config_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
class SSLConfigServiceTest : public testing::Test {
};
bool IsFalseStartIncompatible(const std::string& hostname) {
return net::SSLConfigService::IsKnownFalseStartIncompatibleServer(
hostname);
}
} // namespace
TEST(SSLConfigServiceTest, FalseStartDisabledHosts) {
EXPECT_TRUE(IsFalseStartIncompatible("www.picnik.com"));
EXPECT_FALSE(IsFalseStartIncompatible("picnikfoo.com"));
EXPECT_FALSE(IsFalseStartIncompatible("foopicnik.com"));
}
TEST(SSLConfigServiceTest, FalseStartDisabledDomains) {
EXPECT_TRUE(IsFalseStartIncompatible("yodlee.com"));
EXPECT_TRUE(IsFalseStartIncompatible("a.yodlee.com"));
EXPECT_TRUE(IsFalseStartIncompatible("b.a.yodlee.com"));
EXPECT_FALSE(IsFalseStartIncompatible("ayodlee.com"));
EXPECT_FALSE(IsFalseStartIncompatible("yodleea.com"));
EXPECT_FALSE(IsFalseStartIncompatible("yodlee.org"));
}
|