blob: bb730a57184c40aba3f858f4ff5aba2d2a9e3e74 [file] [log] [blame]
Andrew Top0d1858f2019-05-15 22:01:47 -07001// Copyright 2018 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.
4
5#ifndef NET_COOKIES_CANONICAL_COOKIE_TEST_HELPERS_H_
6#define NET_COOKIES_CANONICAL_COOKIE_TEST_HELPERS_H_
7
8#include <string>
9
10#include "net/cookies/canonical_cookie.h"
11#include "testing/gmock/include/gmock/gmock.h"
12
13namespace net {
14
15MATCHER_P(MatchesCookieLine, cookie_line, "") {
16 std::string argument_line = CanonicalCookie::BuildCookieLine(arg);
17 if (argument_line == cookie_line)
18 return true;
19
20 *result_listener << argument_line;
21 return false;
22}
23
24} // namespace net
25
26#endif // NET_COOKIES_CANONICAL_COOKIE_TEST_HELPERS_H_