diff --git a/atom.gyp b/atom.gyp index 4b6140996..cdcc267c8 100644 --- a/atom.gyp +++ b/atom.gyp @@ -57,12 +57,6 @@ 'tests/cefclient/client_renderer.h', 'tests/cefclient/client_switches.cpp', 'tests/cefclient/client_switches.h', - 'tests/cefclient/res/binding.html', - 'tests/cefclient/res/dialogs.html', - 'tests/cefclient/res/domaccess.html', - 'tests/cefclient/res/localstorage.html', - 'tests/cefclient/res/logo.png', - 'tests/cefclient/res/xmlhttprequest.html', 'tests/cefclient/resource_util.h', 'tests/cefclient/string_util.cpp', 'tests/cefclient/string_util.h', @@ -73,12 +67,6 @@ 'tests/cefclient/mac/English.lproj/InfoPlist.strings', 'tests/cefclient/mac/English.lproj/MainMenu.xib', 'tests/cefclient/mac/Info.plist', - 'tests/cefclient/res/binding.html', - 'tests/cefclient/res/dialogs.html', - 'tests/cefclient/res/domaccess.html', - 'tests/cefclient/res/localstorage.html', - 'tests/cefclient/res/logo.png', - 'tests/cefclient/res/xmlhttprequest.html', ], 'mac_bundle_resources!': [ # TODO(mark): Come up with a fancier way to do this (mac_info_plist?) diff --git a/tests/cefclient/cefclient.cpp b/tests/cefclient/cefclient.cpp index caa0683f5..6d8994b9f 100644 --- a/tests/cefclient/cefclient.cpp +++ b/tests/cefclient/cefclient.cpp @@ -230,107 +230,3 @@ void RunGetTextTest(CefRefPtr browser) { browser->GetMainFrame()->GetText(new Visitor(browser)); } - -void RunRequestTest(CefRefPtr browser) { - // Create a new request - CefRefPtr request(CefRequest::Create()); - - // Set the request URL - request->SetURL("http://tests/request"); - - // Add post data to the request. The correct method and content- - // type headers will be set by CEF. - CefRefPtr postDataElement(CefPostDataElement::Create()); - std::string data = "arg1=val1&arg2=val2"; - postDataElement->SetToBytes(data.length(), data.c_str()); - CefRefPtr postData(CefPostData::Create()); - postData->AddElement(postDataElement); - request->SetPostData(postData); - - // Add a custom header - CefRequest::HeaderMap headerMap; - headerMap.insert( - std::make_pair("X-My-Header", "My Header Value")); - request->SetHeaderMap(headerMap); - - // Load the request - browser->GetMainFrame()->LoadRequest(request); -} - -void RunPopupTest(CefRefPtr browser) { - browser->GetMainFrame()->ExecuteJavaScript( - "window.open('http://www.google.com');", "about:blank", 0); -} - -void RunDialogTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL("http://tests/dialogs"); -} - -void RunPluginInfoTest(CefRefPtr browser) { - class Visitor : public CefWebPluginInfoVisitor { - public: - explicit Visitor(CefRefPtr browser) - : browser_(browser) { - html_ = "Plugin Info Test" - "\nInstalled plugins:"; - } - ~Visitor() { - html_ += "\n"; - - // Load the html in the browser. - browser_->GetMainFrame()->LoadString(html_, "http://tests/plugin_info"); - } - - virtual bool Visit(CefRefPtr info, int count, int total) - OVERRIDE { - html_ += "\n

Name: " + info->GetName().ToString() + - "\n
Description: " + info->GetDescription().ToString() + - "\n
Version: " + info->GetVersion().ToString() + - "\n
Path: " + info->GetPath().ToString(); - return true; - } - - private: - std::string html_; - CefRefPtr browser_; - IMPLEMENT_REFCOUNTING(Visitor); - }; - - CefVisitWebPluginInfo(new Visitor(browser)); -} - -void RunLocalStorageTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL("http://tests/localstorage"); -} - -void RunAccelerated2DCanvasTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL( - "http://mudcu.be/labs/JS1k/BreathingGalaxies.html"); -} - -void RunAcceleratedLayersTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL( - "http://webkit.org/blog-files/3d-transforms/poster-circle.html"); -} - -void RunWebGLTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL( - "http://webglsamples.googlecode.com/hg/field/field.html"); -} - -void RunHTML5VideoTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL( - "http://www.youtube.com/watch?v=siOHh0uzcuY&html5=True"); -} - -void RunXMLHTTPRequestTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL("http://tests/xmlhttprequest"); -} - -void RunDragDropTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL("http://html5demos.com/drag"); -} - -void RunGeolocationTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL("http://html5demos.com/geo"); -}