ceftests: Move TrackCallback to a separate header file

This commit is contained in:
Marshall Greenblatt 2020-08-19 18:25:42 -04:00
parent 08ebbb395a
commit 6337aa6fad
3 changed files with 24 additions and 12 deletions

View File

@ -528,6 +528,7 @@
'tests/ceftests/thread_helper.h',
'tests/ceftests/thread_unittest.cc',
'tests/ceftests/tracing_unittest.cc',
'tests/ceftests/track_callback.h',
'tests/ceftests/translator_unittest.cc',
'tests/ceftests/urlrequest_unittest.cc',
'tests/ceftests/v8_unittest.cc',
@ -591,6 +592,7 @@
'tests/ceftests/test_suite.h',
'tests/ceftests/test_util.cc',
'tests/ceftests/test_util.h',
'tests/ceftests/track_callback.h',
'tests/ceftests/thread_helper.cc',
'tests/ceftests/thread_helper.h',
'tests/ceftests/thread_unittest.cc',

View File

@ -19,20 +19,9 @@
#include "include/cef_task.h"
#include "include/cef_waitable_event.h"
#include "tests/ceftests/thread_helper.h"
#include "tests/ceftests/track_callback.h"
#include "tests/gtest/include/gtest/gtest.h"
class TrackCallback {
public:
TrackCallback() : gotit_(false) {}
void yes() { gotit_ = true; }
bool isSet() { return gotit_; }
void reset() { gotit_ = false; }
operator bool() const { return gotit_; }
protected:
bool gotit_;
};
class ResourceContent {
public:
typedef std::multimap<std::string, std::string> HeaderMap;

View File

@ -0,0 +1,21 @@
// Copyright (c) 2013 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_CEFTESTS_TRACK_CALLBACK_H_
#define CEF_TESTS_CEFTESTS_TRACK_CALLBACK_H_
#pragma once
class TrackCallback {
public:
TrackCallback() : gotit_(false) {}
void yes() { gotit_ = true; }
bool isSet() { return gotit_; }
void reset() { gotit_ = false; }
operator bool() const { return gotit_; }
protected:
bool gotit_;
};
#endif // CEF_TESTS_CEFTESTS_TRACK_CALLBACK_H_