Add CefServer API for handling HTTP/WebSocket requests (issue #2278)

This commit is contained in:
Marshall Greenblatt
2017-11-09 14:00:47 -05:00
parent 39e689d80a
commit 4b39753c41
46 changed files with 5041 additions and 71 deletions

View File

@@ -8,13 +8,14 @@
#include "include/cef_browser.h"
#include "include/wrapper/cef_helpers.h"
#include "tests/cefclient/browser/test_runner.h"
namespace client {
namespace dialog_test {
namespace {
const char kTestUrl[] = "http://tests/dialogs";
const char kTestUrlPath[] = "/dialogs";
const char kFileOpenMessageName[] = "DialogTest.FileOpen";
const char kFileOpenMultipleMessageName[] = "DialogTest.FileOpenMultiple";
const char kFileOpenFolderMessageName[] = "DialogTest.FileOpenFolder";
@@ -109,7 +110,7 @@ class Handler : public CefMessageRouterBrowserSide::Handler {
// Only handle messages from the test URL.
const std::string& url = frame->GetURL();
if (url.find(kTestUrl) != 0)
if (!test_runner::IsTestURL(url, kTestUrlPath))
return false;
if (!dialog_state_.get())