1 // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 5 #include "tests/shared/browser/client_app_browser.h" 6 #include "tests/shared/renderer/client_app_renderer.h" 7 8 using client::ClientAppBrowser; 9 using client::ClientAppRenderer; 10 CreateBrowserDelegates(ClientAppBrowser::DelegateSet & delegates)11void CreateBrowserDelegates(ClientAppBrowser::DelegateSet& delegates) { 12 // Bring in audio output tests. 13 extern void CreateAudioOutputTests(ClientAppBrowser::DelegateSet & delegates); 14 CreateAudioOutputTests(delegates); 15 16 // Bring in the plugin tests. 17 extern void CreateCorsBrowserTests(ClientAppBrowser::DelegateSet & delegates); 18 CreateCorsBrowserTests(delegates); 19 20 // Bring in the PDF viewer tests. 21 extern void CreatePdfViewerBrowserTests(ClientAppBrowser::DelegateSet & 22 delegates); 23 CreatePdfViewerBrowserTests(delegates); 24 25 // Bring in the preference tests. 26 extern void CreatePreferenceBrowserTests(ClientAppBrowser::DelegateSet & 27 delegates); 28 CreatePreferenceBrowserTests(delegates); 29 30 // Bring in URLRequest tests. 31 extern void CreateURLRequestBrowserTests(ClientAppBrowser::DelegateSet & 32 delegates); 33 CreateURLRequestBrowserTests(delegates); 34 } 35 CreateRenderDelegates(ClientAppRenderer::DelegateSet & delegates)36void CreateRenderDelegates(ClientAppRenderer::DelegateSet& delegates) { 37 // Bring in the Frame tests. 38 extern void CreateFrameRendererTests(ClientAppRenderer::DelegateSet & 39 delegates); 40 CreateFrameRendererTests(delegates); 41 42 // Bring in the DOM tests. 43 extern void CreateDOMRendererTests(ClientAppRenderer::DelegateSet & 44 delegates); 45 CreateDOMRendererTests(delegates); 46 47 // Bring in the message router tests. 48 extern void CreateMessageRouterRendererTests(ClientAppRenderer::DelegateSet & 49 delegates); 50 CreateMessageRouterRendererTests(delegates); 51 52 // Bring in the Navigation tests. 53 extern void CreateNavigationRendererTests(ClientAppRenderer::DelegateSet & 54 delegates); 55 CreateNavigationRendererTests(delegates); 56 57 // Bring in the process message tests. 58 extern void CreateProcessMessageRendererTests(ClientAppRenderer::DelegateSet & 59 delegates); 60 CreateProcessMessageRendererTests(delegates); 61 62 // Bring in the RequestHandler tests. 63 extern void CreateRequestHandlerRendererTests(ClientAppRenderer::DelegateSet & 64 delegates); 65 CreateRequestHandlerRendererTests(delegates); 66 67 // Bring in the routing test handler delegate. 68 extern void CreateRoutingTestHandlerDelegate(ClientAppRenderer::DelegateSet & 69 delegates); 70 CreateRoutingTestHandlerDelegate(delegates); 71 72 // Bring in the thread tests. 73 extern void CreateThreadRendererTests(ClientAppRenderer::DelegateSet & 74 delegates); 75 CreateThreadRendererTests(delegates); 76 77 // Bring in the URLRequest tests. 78 extern void CreateURLRequestRendererTests(ClientAppRenderer::DelegateSet & 79 delegates); 80 CreateURLRequestRendererTests(delegates); 81 82 // Bring in the V8 tests. 83 extern void CreateV8RendererTests(ClientAppRenderer::DelegateSet & delegates); 84 CreateV8RendererTests(delegates); 85 } 86 RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar)87void RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) { 88 // Bring in the scheme handler tests. 89 extern void RegisterSchemeHandlerCustomSchemes( 90 CefRawPtr<CefSchemeRegistrar> registrar); 91 RegisterSchemeHandlerCustomSchemes(registrar); 92 93 // Bring in the cookie tests. 94 extern void RegisterCookieCustomSchemes( 95 CefRawPtr<CefSchemeRegistrar> registrar); 96 RegisterCookieCustomSchemes(registrar); 97 98 // Bring in the URLRequest tests. 99 extern void RegisterURLRequestCustomSchemes( 100 CefRawPtr<CefSchemeRegistrar> registrar); 101 RegisterURLRequestCustomSchemes(registrar); 102 103 // Bring in the resource request handler tests. 104 extern void RegisterResourceRequestHandlerCustomSchemes( 105 CefRawPtr<CefSchemeRegistrar> registrar); 106 RegisterResourceRequestHandlerCustomSchemes(registrar); 107 } 108 RegisterCookieableSchemes(std::vector<std::string> & cookieable_schemes)109void RegisterCookieableSchemes(std::vector<std::string>& cookieable_schemes) { 110 // Bring in the scheme handler tests. 111 extern void RegisterSchemeHandlerCookieableSchemes(std::vector<std::string> & 112 cookieable_schemes); 113 RegisterSchemeHandlerCookieableSchemes(cookieable_schemes); 114 115 // Bring in the cookie tests. 116 extern void RegisterCookieCookieableSchemes(std::vector<std::string> & 117 cookieable_schemes); 118 RegisterCookieCookieableSchemes(cookieable_schemes); 119 120 // Bring in the URLRequest tests. 121 extern void RegisterURLRequestCookieableSchemes(std::vector<std::string> & 122 cookieable_schemes); 123 RegisterURLRequestCookieableSchemes(cookieable_schemes); 124 } 125 126 namespace client { 127 128 // static CreateDelegates(DelegateSet & delegates)129void ClientAppBrowser::CreateDelegates(DelegateSet& delegates) { 130 ::CreateBrowserDelegates(delegates); 131 } 132 133 // static CreateDelegates(DelegateSet & delegates)134void ClientAppRenderer::CreateDelegates(DelegateSet& delegates) { 135 ::CreateRenderDelegates(delegates); 136 } 137 138 // static RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar)139void ClientApp::RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) { 140 ::RegisterCustomSchemes(registrar); 141 } 142 143 // static RegisterCookieableSchemes(std::vector<std::string> & cookieable_schemes)144void ClientAppBrowser::RegisterCookieableSchemes( 145 std::vector<std::string>& cookieable_schemes) { 146 ::RegisterCookieableSchemes(cookieable_schemes); 147 } 148 149 } // namespace client 150