Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/cookie-resource-match.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() { 6 function test() {
7 7
8 var cookies = [ 8 var cookies = [
9 createCookie("insecureOnlyWebkit", "1234567890", false, "webkit.org", "/ "), 9 createCookie("insecureOnlyWebkit", "1234567890", false, "webkit.org", "/ "),
10 createCookie("insecureAllWebkit", "1234567890123456", false, ".webkit.or g", "/"), 10 createCookie("insecureAllWebkit", "1234567890123456", false, ".webkit.or g", "/"),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 "http://www.moo.com:80/", // 18 47 "http://www.moo.com:80/", // 18
48 "http://www.boo.com:80", // 19 48 "http://www.boo.com:80", // 19
49 "https://www.boo.com:80/path", // 20 49 "https://www.boo.com:80/path", // 20
50 "http://www.moo.com:80/" // 21 50 "http://www.moo.com:80/" // 21
51 ]; 51 ];
52 52
53 var result = []; 53 var result = [];
54 for (var i = 0; i < cookies.length; ++i) { 54 for (var i = 0; i < cookies.length; ++i) {
55 var cookieResult = []; 55 var cookieResult = [];
56 for (var j = 0; j < resourceURLs.length; ++j) { 56 for (var j = 0; j < resourceURLs.length; ++j) {
57 if (WebInspector.Cookies.cookieMatchesResourceURL(cookies[i], resour ceURLs[j])) 57 if (SDK.Cookies.cookieMatchesResourceURL(cookies[i], resourceURLs[j] ))
58 cookieResult.push(j); 58 cookieResult.push(j);
59 } 59 }
60 InspectorTest.addResult("[" + cookieResult + "]"); 60 InspectorTest.addResult("[" + cookieResult + "]");
61 } 61 }
62 InspectorTest.completeTest(); 62 InspectorTest.completeTest();
63 63
64 function createCookie(name, value, secure, domain, path, port) 64 function createCookie(name, value, secure, domain, path, port)
65 { 65 {
66 var protocolCookie = { 66 var protocolCookie = {
67 name: name, 67 name: name,
68 value: value, 68 value: value,
69 domain: domain, 69 domain: domain,
70 port: port, 70 port: port,
71 path: path, 71 path: path,
72 expires: "Thu Jan 01 1970 00:00:00 GMT", 72 expires: "Thu Jan 01 1970 00:00:00 GMT",
73 size: name.length + value.length, 73 size: name.length + value.length,
74 httpOnly: false, 74 httpOnly: false,
75 secure: secure, 75 secure: secure,
76 session: true 76 session: true
77 }; 77 };
78 return WebInspector.Cookies._parseProtocolCookie(WebInspector.targetMana ger.mainTarget(), protocolCookie); 78 return SDK.Cookies._parseProtocolCookie(SDK.targetManager.mainTarget(), protocolCookie);
79 } 79 }
80 } 80 }
81 </script> 81 </script>
82 </head> 82 </head>
83 83
84 <body onload="runTest()"> 84 <body onload="runTest()">
85 <p> 85 <p>
86 Tests that cookies are matched up with resources correctly. 86 Tests that cookies are matched up with resources correctly.
87 </p> 87 </p>
88 88
89 </body> 89 </body>
90 </html> 90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698