cef/tests/ceftests
Marshall Greenblatt 8f240861e3 Implement NetworkService request interception/handling (see issue #2622).
Implementation notes:
- Chromium change: CookieMonster::SetCookieableSchemes needs to be called
  immediately after the CookieMonster is created in NetworkContext::
  ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and
  NetworkContextParams.cookieable_schemes member (set from
  ProfileNetworkContextService::CreateNetworkContextParams) to support that.
- Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant
  that exposes additional NetworkService request information.
- GetResourceResponseFilter is not yet implemented.

API changes:
- Resource-related callbacks have been moved from CefRequestHandler to a new
  CefResourceRequestHandler interface which is returned via the
  GetResourceRequestHandler method. If the CefRequestHandler declines to handle
  a resource it can optionally be handled by the CefRequestContextHandler, if
  any, associated with the loading context.
- The OnProtocolExecution callback has been moved from CefRequestHandler to
  CefResourceRequestHandler and will be called if a custom scheme request is
  unhandled.
- Cookie send/save permission callbacks have been moved from CefRequestHandler
  and CefResourceHandler to CefResourceRequestHandler.
- New methods added to CefResourceHandler that better match NetworkService
  execution sequence expectations. The old methods are now deprecated.
- New methods added to CefRequest and CefResponse.

Known behavior changes with the NetworkService implementation:
- Modifying the |new_url| parameter in OnResourceRedirect will no longer result
  in the method being called an additional time (likely a bug in the old
  implementation).
- Modifying the request URL in OnResourceResponse would previously cause a
  redirect. This behavior is now deprecated because the NetworkService does not
  support this functionality when using default network loaders. Temporary
  support has been added in combination with CefResourceHandler usage only.
- Other changes to the request object in OnResourceResponse will now cause the
  request to be restarted. This means that OnBeforeResourceLoad, etc, will be
  called an additional time with the new request information.
- CefResponse::GetMimeType will now be empty for non-200 responses.
- Requests using custom schemes can now be handled via CefResourceRequestHandler
  with the same callback behavior as builtin schemes.
- Redirects of custom scheme requests will now be followed as expected.
- Default handling of builtin schemes can now be disabled by setting
  |disable_default_handling| to true in GetResourceRequestHandler.
- Unhandled requests (custom scheme or builtin scheme with default handling
  disabled) will fail with an CefResponse::GetError value of
  ERR_UNKNOWN_URL_SCHEME.
- The CefSchemeHandlerFactory::Create callback will now include cookie headers.

To test:
- Run `cefclient --enable-network-service`. All resources should load
  successfully (this tests the transparent proxy capability).
- All tests pass with NetworkService disabled.
- The following tests pass with NetworkService enabled:
  - CookieTest.*
  - FrameTest.* (excluding .*Nav)
  - NavigationTest.* (excluding .Redirect*)
  - RequestHandlerTest.*
  - RequestContextTest.Basic*
  - RequestContextTest.Popup*
  - RequestTest.*
  - ResourceManagerTest.*
  - ResourceRequestHandlerTest.* (excluding .Filter*)
  - SchemeHandlerTest.*
  - StreamResourceHandlerTest.*
2019-04-23 22:53:28 -04:00
..
extensions Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
resources Compute all version numbers using cef_version.py (see issue #2596) 2019-03-15 13:16:43 -04:00
views Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
CMakeLists.txt.in macOS: Add support for and enable the V2 sandbox (issue #2459) 2018-07-27 22:33:31 -04:00
audio_output_unittest.cc Add ability to capture audio output to buffer (issue #2381) 2019-03-07 17:09:54 -05:00
browser_info_map_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
client_app_delegates.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
command_line_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
cookie_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
dialog_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
display_unittest.cc Update to Chromium revision 9ef2aa86 (#550428) 2018-05-04 10:50:26 +02:00
dom_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
download_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
draggable_regions_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
file_util_unittest.cc Add support for loading extensions (issue #1947) 2017-08-25 18:40:32 -04:00
frame_unittest.cc Add user_gesture parameter to OnBeforeBrowse (issue #1526) 2018-04-27 15:11:53 +00:00
image_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
image_util.cc Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
image_util.h Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
jsdialog_unittest.cc Update to Chromium revision d483fb77 (#474934) 2017-06-02 05:55:23 -07:00
life_span_unittest.cc Update to Chromium revision d483fb77 (#474934) 2017-06-02 05:55:23 -07:00
message_router_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
navigation_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
os_rendering_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
os_rendering_unittest_mac.h Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
os_rendering_unittest_mac.mm macOS: Add support for building clients with ARC enabled (fixes issue #2623). 2019-04-23 17:17:56 +00:00
osr_accessibility_unittest.cc Clarify expectations for CefRenderHandler::GetViewRect (issue #1910) 2018-09-25 16:56:44 +02:00
osr_display_unittest.cc Clarify expectations for CefRenderHandler::GetViewRect (issue #1910) 2018-09-25 16:56:44 +02:00
parser_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
plugin_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
preference_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
print_unittest.cc Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
process_message_unittest.cc Fix assertion when calling SendProcessMessage from non-UI thread (issue #2325) 2017-12-19 15:14:00 -05:00
request_context_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
request_handler_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
request_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
resource.h Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
resource_manager_unittest.cc Update to Chromium revision 5fdc0fab (#520840) 2017-12-14 15:31:07 -05:00
resource_request_handler_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
resource_util_linux.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
resource_util_win_idmap.cc Update to Chromium revision 5fdc0fab (#520840) 2017-12-14 15:31:07 -05:00
routing_test_handler.cc Add user_gesture parameter to OnBeforeBrowse (issue #1526) 2018-04-27 15:11:53 +00:00
routing_test_handler.h Add user_gesture parameter to OnBeforeBrowse (issue #1526) 2018-04-27 15:11:53 +00:00
run_all_unittests.cc Linux: Add support for ozone builds (fixes issue #2296). 2019-04-23 17:00:14 +00:00
run_all_unittests_mac.mm Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
scheme_handler_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
scoped_temp_dir_unittest.cc Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
server_unittest.cc Windows: Fix 64-bit build warning C4267 (issue #2335) 2017-12-27 15:49:52 -05:00
stream_resource_handler_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
stream_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
string_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
task_unittest.cc Update to Chromium revision 66afc5e5 (#540276) 2018-03-22 16:56:23 -04:00
test_handler.cc Add unit test for crash due to by delayed execution of JS functions on destroyed windows (issue #2038) 2018-02-22 15:37:55 -05:00
test_handler.h Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
test_suite.cc Linux: Add multi-threaded message loop support (issue #2512) 2018-09-20 15:17:35 +02:00
test_suite.h Add support for loading extensions (issue #1947) 2017-08-25 18:40:32 -04:00
test_util.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
test_util.h Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
thread_helper.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
thread_helper.h Update to Chromium revision 66afc5e5 (#540276) 2018-03-22 16:56:23 -04:00
thread_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
tracing_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
translator_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
urlrequest_unittest.cc Implement NetworkService request interception/handling (see issue #2622). 2019-04-23 22:53:28 -04:00
v8_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
values_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
version_unittest.cc Compute all version numbers using cef_version.py (see issue #2596) 2019-03-15 13:16:43 -04:00
waitable_event_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
webui_unittest.cc Update to Chromium version 74.0.3729.0 (#638880) 2019-03-13 21:27:37 +00:00
xml_reader_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
zip_reader_unittest.cc Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00