"Fossies" - the Fresh Open Source Software Archive 
Member "phantomjs-2.1.1/src/consts.h" (24 Jan 2016, 3431 Bytes) of package /linux/www/old/phantomjs-2.1.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /*
2 This file is part of the PhantomJS project from Ofi Labs.
3
4 Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
5 Copyright (C) 2011 Ivan De Marino <ivan.de.marino@gmail.com>
6 Copyright (C) 2011 James Roe <roejames12@hotmail.com>
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
11 * Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13 * Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16 * Neither the name of the <organization> nor the
17 names of its contributors may be used to endorse or promote products
18 derived from this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
24 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 #ifndef CONSTS_H
33 #define CONSTS_H
34
35 #define PHANTOMJS_VERSION_MAJOR 2
36 #define PHANTOMJS_VERSION_MINOR 1
37 #define PHANTOMJS_VERSION_PATCH 1
38 #define PHANTOMJS_VERSION_STRING "2.1.1"
39
40 #define HTTP_HEADER_CONTENT_LENGTH "content-length"
41 #define HTTP_HEADER_CONTENT_TYPE "content-type"
42
43 #define JAVASCRIPT_SOURCE_PLATFORM_URL "phantomjs://platform/%1"
44 #define JAVASCRIPT_SOURCE_CODE_URL "phantomjs://code/%1"
45
46 #define JS_ELEMENT_CLICK "(function (el) { " \
47 "var ev = document.createEvent('MouseEvents');" \
48 "ev.initEvent(\"click\", true, true);" \
49 "el.dispatchEvent(ev);" \
50 "})(this);"
51
52 #define JS_APPEND_SCRIPT_ELEMENT "var el = document.createElement('script');" \
53 "el.onload = function() { alert('%1'); };" \
54 "el.src = '%1';" \
55 "document.body.appendChild(el);"
56
57 #define PAGE_SETTINGS_LOAD_IMAGES "loadImages"
58 #define PAGE_SETTINGS_JS_ENABLED "javascriptEnabled"
59 #define PAGE_SETTINGS_XSS_AUDITING "XSSAuditingEnabled"
60 #define PAGE_SETTINGS_USER_AGENT "userAgent"
61 #define PAGE_SETTINGS_PROXY "proxy"
62 #define PAGE_SETTINGS_LOCAL_ACCESS_REMOTE "localToRemoteUrlAccessEnabled"
63 #define PAGE_SETTINGS_USERNAME "userName"
64 #define PAGE_SETTINGS_PASSWORD "password"
65 #define PAGE_SETTINGS_MAX_AUTH_ATTEMPTS "maxAuthAttempts"
66 #define PAGE_SETTINGS_RESOURCE_TIMEOUT "resourceTimeout"
67 #define PAGE_SETTINGS_WEB_SECURITY_ENABLED "webSecurityEnabled"
68 #define PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS "javascriptCanOpenWindows"
69 #define PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS "javascriptCanCloseWindows"
70
71 #define DEFAULT_WEBDRIVER_CONFIG "127.0.0.1:8910"
72
73 #endif // CONSTS_H