Add ewk_view_fullscreen_exit to exit fullscreen mode
[framework/web/webkit-efl.git] / LayoutTests / inspector / cookie-resource-match.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test() {
7
8     var cookies = [
9         createCookie("insecureOnlyWebkit", "1234567890", false, "webkit.org", "/"),
10         createCookie("insecureAllWebkit", "1234567890123456", false, ".webkit.org", "/"),
11         createCookie("insecureAllWebkitPath", "1234567890123456", false, ".webkit.org", "/path"),
12         createCookie("secureOnlyWebkitPath", "bar", true, "webkit.org", "/path"),
13         createCookie("secureAllWebkit", "foo", true, ".webkit.org", "/"),
14         createCookie("secureAllWebkitPath", "foo", true, ".webkit.org", "/path"),
15         createCookie("insecureOnlyWebkitPort", "1234567890", false, "webkit.org", "/", 80),
16         createCookie("insecureAllWebkitPort", "1234567890123456", false, ".webkit.org", "/", 80),
17         createCookie("insecureAllWebkitPathPort", "1234567890123456", false, ".webkit.org", "/path", 80),
18         createCookie("secureOnlyWebkitPathPort", "bar", true, "webkit.org", "/path", 80),
19         createCookie("secureAllWebkitPort", "foo", true, ".webkit.org", "/", 80),
20         createCookie("secureAllWebkitPathPort", "foo", true, ".webkit.org", "/path", 80),
21         createCookie("nonMatching1", "bar", false, "webkit.zoo", "/"),
22         createCookie("nonMatching2", "bar", false, "webkit.org", "/badPath"),
23         createCookie("nonMatching3", "bar", true, ".moo.com", "/")
24     ];
25
26     var resourceURLs = [
27         "http://webkit.org", // 0
28         "http://www.webkit.org:81", // 1
29         "http://webkit.org/path", // 2
30         "http://www.webkit.org/path", // 3
31         "https://webkit.org/", // 4
32         "https://www.webkit.org/", // 5
33         "https://webkit.org:81/path", // 6
34         "https://www.webkit.org/path", // 7
35
36         "http://webkit.org:80", // 8
37         "http://www.webkit.org:80", // 9
38         "http://webkit.org:80/path", // 10
39         "http://www.webkit.org:80/path", // 11
40         "https://webkit.org:80/", // 12
41         "https://www.webkit.org:80/", // 13
42         "https://webkit.org:80/path", // 14
43         "https://www.webkit.org:80/path", // 15
44
45         "http://www.boo.com:80", // 16
46         "https://www.boo.com:80/path", // 17
47         "http://www.moo.com:80/", // 18
48         "http://www.boo.com:80", // 19
49         "https://www.boo.com:80/path", // 20
50         "http://www.moo.com:80/" // 21
51     ];
52
53     var result = [];
54     for (var i = 0; i < cookies.length; ++i) {
55         var cookieResult = [];
56         for (var j = 0; j < resourceURLs.length; ++j) {
57             if (WebInspector.Cookies.cookieMatchesResourceURL(cookies[i], resourceURLs[j]))
58                 cookieResult.push(j);
59         }
60         InspectorTest.addResult("[" + cookieResult + "]");
61     }
62     InspectorTest.completeTest();
63
64     function createCookie(name, value, secure, domain, path, port)
65     {
66         return {
67             name: name,
68             value: value,
69             domain: domain,
70             port: port,
71             path: path,
72             expires: "Thu Jan 01 1970 00:00:00 GMT",
73             size: name.length + value.length,
74             httpOnly: false,
75             secure: secure,
76             session: true
77         };
78     }
79 }
80 </script>
81 </head>
82
83 <body onload="runTest()">
84 <p>
85 Tests that cookies are matched up with resources correctly.
86 </p>
87
88 </body>
89 </html>