summaryrefslogtreecommitdiff
path: root/chromium/net/cookies/cookie_change_dispatcher_test_helpers.cc
blob: 3419e6653fe68ab527455f5cbad5cb1284604419 (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 2018 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/cookies/cookie_change_dispatcher_test_helpers.h"

#include "base/notreached.h"

namespace net {

// Google Test helper.
std::ostream& operator<<(std::ostream& os, const CookieChangeCause& cause) {
  switch (cause) {
    case CookieChangeCause::INSERTED:
      return os << "INSERTED";
    case CookieChangeCause::EXPLICIT:
      return os << "EXPLICIT";
    case CookieChangeCause::UNKNOWN_DELETION:
      return os << "UNKNOWN_DELETION";
    case CookieChangeCause::OVERWRITE:
      return os << "OVERWRITE";
    case CookieChangeCause::EXPIRED:
      return os << "EXPIRED";
    case CookieChangeCause::EVICTED:
      return os << "EVICTED";
    case CookieChangeCause::EXPIRED_OVERWRITE:
      return os << "EXPIRED_OVERWRITE";
  }
  NOTREACHED();
  return os;
}

}  // namespace net