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

Side by Side Diff: chrome_frame/test/data/chrome_frame_tester_helpers.js

Issue 345032: Updates CFInstall.js to:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/data/CFInstall_place.html ('k') | chrome_frame/test/http_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // 1 //
2 // This script provides some mechanics for testing ChromeFrame 2 // This script provides some mechanics for testing ChromeFrame
3 // 3 //
4 function onSuccess(name, id) { 4 function onSuccess(name, id) {
5 onFinished(name, id, "OK"); 5 onFinished(name, id, "OK");
6 } 6 }
7 7
8 function onFailure(name, id, status) { 8 function onFailure(name, id, status) {
9 onFinished(name, id, status); 9 onFinished(name, id, status);
10 } 10 }
11 11
12 function byId(id) {
13 return document.getElementById(id);
14 }
15
12 function getXHRObject(){ 16 function getXHRObject(){
13 var XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 17 var XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP',
14 'Msxml2.XMLHTTP.4.0']; 18 'Msxml2.XMLHTTP.4.0'];
15 var http = null; 19 var http = null;
16 try { 20 try {
17 http = new XMLHttpRequest(); 21 http = new XMLHttpRequest();
18 } catch(e) { 22 } catch(e) {
19 } 23 }
20 24
21 if (http) 25 if (http)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 88
85 // set a cookie to report the results... 89 // set a cookie to report the results...
86 var cookie = name + "." + id + ".status=" + result + "; path=/"; 90 var cookie = name + "." + id + ".status=" + result + "; path=/";
87 document.cookie = cookie; 91 document.cookie = cookie;
88 92
89 // ...and POST the status back to the server 93 // ...and POST the status back to the server
90 postResult(name, result); 94 postResult(name, result);
91 } 95 }
92 96
93 function appendStatus(message) { 97 function appendStatus(message) {
94 var statusPanel = document.getElementById("statusPanel"); 98 var statusPanel = byId("statusPanel");
95 if (statusPanel) { 99 if (statusPanel) {
96 statusPanel.innerHTML += '<BR>' + message; 100 statusPanel.innerHTML += '<BR>' + message;
97 } 101 }
98 } 102 }
99 103
100 function readCookie(name) { 104 function readCookie(name) {
101 var cookie_name = name + "="; 105 var cookie_name = name + "=";
102 var ca = document.cookie.split(';'); 106 var ca = document.cookie.split(';');
103 107
104 for(var i = 0 ; i < ca.length ; i++) { 108 for(var i = 0 ; i < ca.length ; i++) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 150 }
147 151
148 function TestIfRunningInChrome() { 152 function TestIfRunningInChrome() {
149 var is_chrome = isRunningInChrome(); 153 var is_chrome = isRunningInChrome();
150 if (!is_chrome) { 154 if (!is_chrome) {
151 onFailure("ChromeFrameWindowOpen", "Window Open failed :-(", 155 onFailure("ChromeFrameWindowOpen", "Window Open failed :-(",
152 "User agent = " + navigator.userAgent.toLowerCase()); 156 "User agent = " + navigator.userAgent.toLowerCase());
153 } 157 }
154 return is_chrome; 158 return is_chrome;
155 } 159 }
OLDNEW
« no previous file with comments | « chrome_frame/test/data/CFInstall_place.html ('k') | chrome_frame/test/http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698