Roll ICU to r205936
[chromium-blink-merge.git] / net / base / load_timing_info_test_util.h
blob5c2fd172a77d4f4c4846af2b7d43d594fb9d207c
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_BASE_LOAD_TIMING_INFO_TEST_UTIL_H_
6 #define NET_BASE_LOAD_TIMING_INFO_TEST_UTIL_H_
8 #include "net/base/load_timing_info.h"
10 namespace net {
12 // Flags indicating which times in a LoadTimingInfo::ConnectTiming struct should
13 // be non-null.
14 enum ConnectTimeFlags {
15 CONNECT_TIMING_HAS_CONNECT_TIMES_ONLY = 0,
16 CONNECT_TIMING_HAS_DNS_TIMES = 1 << 0,
17 CONNECT_TIMING_HAS_SSL_TIMES = 1 << 1,
20 // Checks that all times in |connect_timing| are null.
21 void ExpectConnectTimingHasNoTimes(
22 const LoadTimingInfo::ConnectTiming& connect_timing);
24 // Checks that |connect_timing|'s times are in the correct order.
25 // |connect_start| and |connect_end| must be non-null. Checks null state and
26 // order of DNS times and SSL times based on |flags|, which must be a
27 // combination of ConnectTimeFlags.
28 void ExpectConnectTimingHasTimes(
29 const LoadTimingInfo::ConnectTiming& connect_timing,
30 int connect_timing_flags);
32 // Tests that all non-connection establishment times in |load_timing_info| are
33 // null. Its |connect_timing| field is ignored.
34 void ExpectLoadTimingHasOnlyConnectionTimes(
35 const LoadTimingInfo& load_timing_info);
37 } // namespace net
39 #endif // NET_BASE_LOAD_TIMING_INFO_TEST_UTIL_H_