Lines Matching full:browser
5 #include "tests/cefclient/browser/test_runner.h"
18 #include "tests/cefclient/browser/binding_test.h"
19 #include "tests/cefclient/browser/client_handler.h"
20 #include "tests/cefclient/browser/dialog_test.h"
21 #include "tests/cefclient/browser/drm_test.h"
22 #include "tests/cefclient/browser/main_context.h"
23 #include "tests/cefclient/browser/media_router_test.h"
24 #include "tests/cefclient/browser/preferences_test.h"
25 #include "tests/cefclient/browser/resource.h"
26 #include "tests/cefclient/browser/response_filter_test.h"
27 #include "tests/cefclient/browser/root_window_manager.h"
28 #include "tests/cefclient/browser/scheme_test.h"
29 #include "tests/cefclient/browser/server_test.h"
30 #include "tests/cefclient/browser/urlrequest_test.h"
31 #include "tests/cefclient/browser/window_test.h"
32 #include "tests/shared/browser/resource_util.h"
48 // Set page data and navigate the browser. Used in combination with
50 void LoadStringResourcePage(CefRefPtr<CefBrowser> browser, in LoadStringResourcePage() argument
53 CefRefPtr<CefClient> client = browser->GetHost()->GetClient(); in LoadStringResourcePage()
56 browser->GetMainFrame()->LoadURL(kTestOrigin + page); in LoadStringResourcePage()
77 void RunGetSourceTest(CefRefPtr<CefBrowser> browser) { in RunGetSourceTest() argument
80 explicit Visitor(CefRefPtr<CefBrowser> browser) : browser_(browser) {} in RunGetSourceTest() argument
95 browser->GetMainFrame()->GetSource(new Visitor(browser)); in RunGetSourceTest()
98 void RunGetTextTest(CefRefPtr<CefBrowser> browser) { in RunGetTextTest() argument
101 explicit Visitor(CefRefPtr<CefBrowser> browser) : browser_(browser) {} in RunGetTextTest() argument
116 browser->GetMainFrame()->GetText(new Visitor(browser)); in RunGetTextTest()
119 void RunRequestTest(CefRefPtr<CefBrowser> browser) { in RunRequestTest() argument
123 if (browser->GetMainFrame()->GetURL().ToString().find("http://tests/") != 0) { in RunRequestTest()
127 Alert(browser, in RunRequestTest()
151 browser->GetMainFrame()->LoadRequest(request); in RunRequestTest()
154 void RunNewWindowTest(CefRefPtr<CefBrowser> browser) { in RunNewWindowTest() argument
157 config.with_osr = browser->GetHost()->IsWindowRenderingDisabled(); in RunNewWindowTest()
161 void RunPopupWindowTest(CefRefPtr<CefBrowser> browser) { in RunPopupWindowTest() argument
162 browser->GetMainFrame()->ExecuteJavaScript( in RunPopupWindowTest()
166 void RunPluginInfoTest(CefRefPtr<CefBrowser> browser) { in RunPluginInfoTest() argument
169 explicit Visitor(CefRefPtr<CefBrowser> browser) : browser_(browser) { in RunPluginInfoTest() argument
178 // Load the html in the browser. in RunPluginInfoTest()
198 CefVisitWebPluginInfo(new Visitor(browser)); in RunPluginInfoTest()
201 void ModifyZoom(CefRefPtr<CefBrowser> browser, double delta) { in ModifyZoom() argument
204 CefPostTask(TID_UI, base::Bind(&ModifyZoom, browser, delta)); in ModifyZoom()
208 browser->GetHost()->SetZoomLevel(browser->GetHost()->GetZoomLevel() + delta); in ModifyZoom()
221 virtual bool OnQuery(CefRefPtr<CefBrowser> browser, in OnQuery() argument
243 SetFPS(browser, atoi(value.c_str())); in OnQuery()
245 SetDSF(browser, static_cast<float>(atof(value.c_str()))); in OnQuery()
254 void SetFPS(CefRefPtr<CefBrowser> browser, int fps) { in SetFPS() argument
262 browser->GetHost()->SetWindowlessFrameRate(fps); in SetFPS()
265 void SetDSF(CefRefPtr<CefBrowser> browser, float dsf) { in SetDSF() argument
267 base::Bind(&PromptHandler::SetDSFOnMainThread, browser, dsf)); in SetDSF()
270 static void SetDSFOnMainThread(CefRefPtr<CefBrowser> browser, float dsf) { in SetDSFOnMainThread() argument
271 RootWindow::GetForBrowser(browser->GetIdentifier()) in SetDSFOnMainThread()
276 void Prompt(CefRefPtr<CefBrowser> browser, in Prompt() argument
287 browser->GetMainFrame()->ExecuteJavaScript( in Prompt()
288 code, browser->GetMainFrame()->GetURL(), 0); in Prompt()
291 void PromptFPS(CefRefPtr<CefBrowser> browser) { in PromptFPS() argument
294 CefPostTask(TID_UI, base::Bind(&PromptFPS, browser)); in PromptFPS()
300 ss << browser->GetHost()->GetWindowlessFrameRate(); in PromptFPS()
302 Prompt(browser, kPromptFPS, "Enter FPS", ss.str()); in PromptFPS()
305 void PromptDSF(CefRefPtr<CefBrowser> browser) { in PromptDSF() argument
308 MainMessageLoop::Get()->PostClosure(base::Bind(&PromptDSF, browser)); in PromptDSF()
314 ss << RootWindow::GetForBrowser(browser->GetIdentifier()) in PromptDSF()
317 Prompt(browser, kPromptDSF, "Enter Device Scale Factor", ss.str()); in PromptDSF()
330 void EndTracing(CefRefPtr<CefBrowser> browser) { in EndTracing() argument
333 CefPostTask(TID_UI, base::Bind(&EndTracing, browser)); in EndTracing()
339 explicit Client(CefRefPtr<CefBrowser> browser) : browser_(browser) { in EndTracing() argument
383 new Client(browser); in EndTracing()
386 void PrintToPDF(CefRefPtr<CefBrowser> browser) { in PrintToPDF() argument
389 CefPostTask(TID_UI, base::Bind(&PrintToPDF, browser)); in PrintToPDF()
395 explicit Client(CefRefPtr<CefBrowser> browser) : browser_(browser) { in PrintToPDF() argument
445 new Client(browser); in PrintToPDF()
448 void MuteAudio(CefRefPtr<CefBrowser> browser, bool mute) { in MuteAudio() argument
449 CefRefPtr<CefBrowserHost> host = browser->GetHost(); in MuteAudio()
453 void RunOtherTests(CefRefPtr<CefBrowser> browser) { in RunOtherTests() argument
454 browser->GetMainFrame()->LoadURL("http://tests/other_tests"); in RunOtherTests()
576 void RunTest(CefRefPtr<CefBrowser> browser, int id) { in RunTest() argument
577 if (!browser) in RunTest()
582 RunGetSourceTest(browser); in RunTest()
585 RunGetTextTest(browser); in RunTest()
588 RunNewWindowTest(browser); in RunTest()
591 RunPopupWindowTest(browser); in RunTest()
594 RunRequestTest(browser); in RunTest()
597 RunPluginInfoTest(browser); in RunTest()
600 ModifyZoom(browser, 0.5); in RunTest()
603 ModifyZoom(browser, -0.5); in RunTest()
606 browser->GetHost()->SetZoomLevel(0.0); in RunTest()
609 PromptFPS(browser); in RunTest()
612 PromptDSF(browser); in RunTest()
618 EndTracing(browser); in RunTest()
621 browser->GetHost()->Print(); in RunTest()
624 PrintToPDF(browser); in RunTest()
627 MuteAudio(browser, true); in RunTest()
630 MuteAudio(browser, false); in RunTest()
633 RunOtherTests(browser); in RunTest()
801 // Execute on the browser IO thread. in SetupResourceManager()
844 void Alert(CefRefPtr<CefBrowser> browser, const std::string& message) { in Alert() argument
845 if (browser->GetHost()->GetExtension()) { in Alert()
847 // the active browser. in Alert()
848 browser = MainContext::Get()->GetRootWindowManager()->GetActiveBrowser(); in Alert()
849 if (!browser) in Alert()
858 CefRefPtr<CefFrame> frame = browser->GetMainFrame(); in Alert()
908 CefRefPtr<CefBrowser> browser, in GetResourceResponseFilter() argument
913 return response_filter_test::GetResourceResponseFilter(browser, frame, in GetResourceResponseFilter()