2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_TESTS_UNITTESTS_TEST_UTIL_H_
|
|
|
|
#define CEF_TESTS_UNITTESTS_TEST_UTIL_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/cef_process_message.h"
|
2012-06-19 18:29:49 +02:00
|
|
|
#include "include/cef_request.h"
|
|
|
|
#include "include/cef_response.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "include/cef_values.h"
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
// Test that CefRequest::HeaderMap objects are equal
|
|
|
|
// If |allowExtras| is true then additional header fields will be allowed in
|
|
|
|
// |map2|.
|
2016-03-02 00:59:53 +01:00
|
|
|
void TestMapEqual(const CefRequest::HeaderMap& map1,
|
|
|
|
const CefRequest::HeaderMap& map2,
|
2012-06-19 18:29:49 +02:00
|
|
|
bool allowExtras);
|
|
|
|
|
2016-03-02 00:59:53 +01:00
|
|
|
// Test that the CefRequest::HeaderMap object contains no duplicate entries.
|
|
|
|
void TestMapNoDuplicates(const CefRequest::HeaderMap& map);
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
// Test that CefPostDataElement objects are equal
|
|
|
|
void TestPostDataElementEqual(CefRefPtr<CefPostDataElement> elem1,
|
|
|
|
CefRefPtr<CefPostDataElement> elem2);
|
|
|
|
|
|
|
|
// Test that CefPostData objects are equal
|
|
|
|
void TestPostDataEqual(CefRefPtr<CefPostData> postData1,
|
|
|
|
CefRefPtr<CefPostData> postData2);
|
|
|
|
|
|
|
|
// Test that CefRequest objects are equal
|
|
|
|
// If |allowExtras| is true then additional header fields will be allowed in
|
|
|
|
// |request2|.
|
|
|
|
void TestRequestEqual(CefRefPtr<CefRequest> request1,
|
|
|
|
CefRefPtr<CefRequest> request2,
|
|
|
|
bool allowExtras);
|
|
|
|
|
|
|
|
// Test that CefResponse objects are equal
|
|
|
|
// If |allowExtras| is true then additional header fields will be allowed in
|
|
|
|
// |response2|.
|
|
|
|
void TestResponseEqual(CefRefPtr<CefResponse> response1,
|
|
|
|
CefRefPtr<CefResponse> response2,
|
|
|
|
bool allowExtras);
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// Test if two binary values are equal.
|
|
|
|
void TestBinaryEqual(CefRefPtr<CefBinaryValue> val1,
|
|
|
|
CefRefPtr<CefBinaryValue> val2);
|
|
|
|
|
|
|
|
// Test if two list values are equal.
|
2017-05-17 11:29:28 +02:00
|
|
|
void TestListEqual(CefRefPtr<CefListValue> val1, CefRefPtr<CefListValue> val2);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Test if two dictionary values are equal.
|
|
|
|
void TestDictionaryEqual(CefRefPtr<CefDictionaryValue> val1,
|
|
|
|
CefRefPtr<CefDictionaryValue> val2);
|
|
|
|
|
|
|
|
// Test if two process message values are equal.
|
|
|
|
void TestProcessMessageEqual(CefRefPtr<CefProcessMessage> val1,
|
|
|
|
CefRefPtr<CefProcessMessage> val2);
|
|
|
|
|
2012-10-16 21:28:07 +02:00
|
|
|
// Test if two CefString vectors are equal.
|
|
|
|
void TestStringVectorEqual(const std::vector<CefString>& val1,
|
|
|
|
const std::vector<CefString>& val2);
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif // CEF_TESTS_UNITTESTS_TEST_UTIL_H_
|