mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-26 17:42:35 +01:00
ceftests: Move TrackCallback to a separate header file
This commit is contained in:
parent
08ebbb395a
commit
6337aa6fad
@ -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',
|
||||
|
@ -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;
|
||||
|
21
tests/ceftests/track_callback.h
Normal file
21
tests/ceftests/track_callback.h
Normal 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_
|
Loading…
Reference in New Issue
Block a user