mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-17 03:48:49 +01:00
9cff99dc4e
- Add CefRequestContext::LoadExtension, CefExtension, CefExtensionHandler and related methods/interfaces. - Add chrome://extensions-support that lists supported Chrome APIs. - Add CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize to support browser resize based on preferred web contents size. - views: Add support for custom CefMenuButton popups. - cefclient: Run with `--load-extension=set_page_color` command-line flag for an extension loading example. Add `--use-views` on Windows and Linux for an even better example.
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
// Copyright 2016 The Chromium Embedded Framework Authors. Postions copyright
|
|
// 2012 The Chromium 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_SUITE_H_
|
|
#define CEF_TESTS_UNITTESTS_TEST_SUITE_H_
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "include/cef_command_line.h"
|
|
#include "include/wrapper/cef_helpers.h"
|
|
|
|
// A single instance of this object will be created by main() in
|
|
// run_all_unittests.cc.
|
|
class CefTestSuite {
|
|
public:
|
|
CefTestSuite(int argc, char** argv);
|
|
~CefTestSuite();
|
|
|
|
static CefTestSuite* GetInstance();
|
|
|
|
void InitMainProcess();
|
|
int Run();
|
|
|
|
void GetSettings(CefSettings& settings) const;
|
|
bool GetCachePath(std::string& path) const;
|
|
|
|
// Register a temp directory that should be deleted on shutdown.
|
|
void RegisterTempDirectory(const CefString& directory);
|
|
|
|
// Called after shutdown to delete any registered temp directories.
|
|
void DeleteTempDirectories();
|
|
|
|
CefRefPtr<CefCommandLine> command_line() const { return command_line_; }
|
|
|
|
// The return value from Run().
|
|
int retval() const { return retval_; }
|
|
|
|
private:
|
|
void PreInitialize();
|
|
void Initialize();
|
|
void Shutdown();
|
|
|
|
int argc_;
|
|
CefScopedArgArray argv_;
|
|
CefRefPtr<CefCommandLine> command_line_;
|
|
|
|
std::vector<CefString> temp_directories_;
|
|
base::Lock temp_directories_lock_;
|
|
|
|
int retval_;
|
|
};
|
|
|
|
#define CEF_SETTINGS_ACCEPT_LANGUAGE "en-GB"
|
|
|
|
#endif // CEF_TESTS_UNITTESTS_TEST_SUITE_H_
|