blob: fe991278fe00ad8bce6a9e654799ed00c0349d25 [file] [log] [blame]
Victor Costan85874942018-02-28 04:11:441// 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
Bence Békyb7bf2ad2019-04-22 14:16:0126#endif // NET_COOKIES_CANONICAL_COOKIE_TEST_HELPERS_H_