mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
remove html test files
This commit is contained in:
12
atom.gyp
12
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?)
|
||||
|
||||
@@ -230,107 +230,3 @@ void RunGetTextTest(CefRefPtr<CefBrowser> browser) {
|
||||
|
||||
browser->GetMainFrame()->GetText(new Visitor(browser));
|
||||
}
|
||||
|
||||
void RunRequestTest(CefRefPtr<CefBrowser> browser) {
|
||||
// Create a new request
|
||||
CefRefPtr<CefRequest> 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<CefPostDataElement> postDataElement(CefPostDataElement::Create());
|
||||
std::string data = "arg1=val1&arg2=val2";
|
||||
postDataElement->SetToBytes(data.length(), data.c_str());
|
||||
CefRefPtr<CefPostData> 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<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->ExecuteJavaScript(
|
||||
"window.open('http://www.google.com');", "about:blank", 0);
|
||||
}
|
||||
|
||||
void RunDialogTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL("http://tests/dialogs");
|
||||
}
|
||||
|
||||
void RunPluginInfoTest(CefRefPtr<CefBrowser> browser) {
|
||||
class Visitor : public CefWebPluginInfoVisitor {
|
||||
public:
|
||||
explicit Visitor(CefRefPtr<CefBrowser> browser)
|
||||
: browser_(browser) {
|
||||
html_ = "<html><head><title>Plugin Info Test</title></head><body>"
|
||||
"\n<b>Installed plugins:</b>";
|
||||
}
|
||||
~Visitor() {
|
||||
html_ += "\n</body></html>";
|
||||
|
||||
// Load the html in the browser.
|
||||
browser_->GetMainFrame()->LoadString(html_, "http://tests/plugin_info");
|
||||
}
|
||||
|
||||
virtual bool Visit(CefRefPtr<CefWebPluginInfo> info, int count, int total)
|
||||
OVERRIDE {
|
||||
html_ += "\n<br/><br/>Name: " + info->GetName().ToString() +
|
||||
"\n<br/>Description: " + info->GetDescription().ToString() +
|
||||
"\n<br/>Version: " + info->GetVersion().ToString() +
|
||||
"\n<br/>Path: " + info->GetPath().ToString();
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string html_;
|
||||
CefRefPtr<CefBrowser> browser_;
|
||||
IMPLEMENT_REFCOUNTING(Visitor);
|
||||
};
|
||||
|
||||
CefVisitWebPluginInfo(new Visitor(browser));
|
||||
}
|
||||
|
||||
void RunLocalStorageTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL("http://tests/localstorage");
|
||||
}
|
||||
|
||||
void RunAccelerated2DCanvasTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL(
|
||||
"http://mudcu.be/labs/JS1k/BreathingGalaxies.html");
|
||||
}
|
||||
|
||||
void RunAcceleratedLayersTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL(
|
||||
"http://webkit.org/blog-files/3d-transforms/poster-circle.html");
|
||||
}
|
||||
|
||||
void RunWebGLTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL(
|
||||
"http://webglsamples.googlecode.com/hg/field/field.html");
|
||||
}
|
||||
|
||||
void RunHTML5VideoTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL(
|
||||
"http://www.youtube.com/watch?v=siOHh0uzcuY&html5=True");
|
||||
}
|
||||
|
||||
void RunXMLHTTPRequestTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL("http://tests/xmlhttprequest");
|
||||
}
|
||||
|
||||
void RunDragDropTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL("http://html5demos.com/drag");
|
||||
}
|
||||
|
||||
void RunGeolocationTest(CefRefPtr<CefBrowser> browser) {
|
||||
browser->GetMainFrame()->LoadURL("http://html5demos.com/geo");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user