summaryrefslogtreecommitdiffstats
path: root/test/src/test-url.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-06-20 19:53:21 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-06-20 19:53:21 (GMT)
commit794575f01ce5a6bf7e377eb815f3def5aded74f5 (patch)
tree9c59df64ee290f68b7b6c8698bfac4169684485e /test/src/test-url.cpp
parentd304f85417e3175c5f2ca159dd303309c24e7b81 (diff)
downloaduscxml-794575f01ce5a6bf7e377eb815f3def5aded74f5.zip
uscxml-794575f01ce5a6bf7e377eb815f3def5aded74f5.tar.gz
uscxml-794575f01ce5a6bf7e377eb815f3def5aded74f5.tar.bz2
New version with XHTML invoker
Diffstat (limited to 'test/src/test-url.cpp')
-rw-r--r--test/src/test-url.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/src/test-url.cpp b/test/src/test-url.cpp
index 69951e4..69f9014 100644
--- a/test/src/test-url.cpp
+++ b/test/src/test-url.cpp
@@ -16,7 +16,9 @@ class TestServlet : public HTTPServlet {
public:
TestServlet(bool adaptPath) : _canAdaptPath(adaptPath) {}
- void httpRecvRequest(const HTTPServer::Request& request) {};
+ bool httpRecvRequest(const HTTPServer::Request& request) {
+ return true;
+ };
bool canAdaptPath() {
return _canAdaptPath;
}
@@ -69,6 +71,9 @@ int main(int argc, char** argv) {
URL exeUrl(exeName);
exeUrl.toAbsolute(baseUrl);
assert(canResolve(exeUrl.asString()));
+ std::cout << exeUrl.asString() << std::endl;
+ exeUrl.download(true);
+ assert(exeUrl.getInContent().length() > 0);
}
{
@@ -105,6 +110,11 @@ int main(int argc, char** argv) {
}
{
+ Data data = Data::fromJSON("{\"shiftKey\":false,\"toElement\":{\"id\":\"\",\"localName\":\"body\"},\"clientY\":38,\"y\":38,\"x\":66,\"ctrlKey\":false,\"relatedTarget\":{\"id\":\"\",\"localName\":\"body\"},\"clientX\":66,\"screenY\":288,\"metaKey\":false,\"offsetX\":58,\"altKey\":false,\"offsetY\":30,\"fromElement\":{\"id\":\"foo\",\"localName\":\"div\"},\"screenX\":-1691,\"dataTransfer\":null,\"button\":0,\"pageY\":38,\"layerY\":38,\"pageX\":66,\"charCode\":0,\"which\":0,\"keyCode\":0,\"detail\":0,\"layerX\":66,\"returnValue\":true,\"timeStamp\":1371223991895,\"eventPhase\":2,\"target\":{\"id\":\"foo\",\"localName\":\"div\"},\"defaultPrevented\":false,\"srcElement\":{\"id\":\"foo\",\"localName\":\"div\"},\"type\":\"mouseout\",\"cancelable\":true,\"currentTarget\":{\"id\":\"foo\",\"localName\":\"div\"},\"bubbles\":true,\"cancelBubble\":false}");
+ std::cout << data << std::endl;
+ }
+
+ {
Data data = Data::fromJSON("asdf");
std::cout << data << std::endl;
}