OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 if (element.hasAttribute("id")) | 1238 if (element.hasAttribute("id")) |
1239 m_delegate->printMessage(string("id '") + element.getAttribute("
id").utf8().data() + "'"); | 1239 m_delegate->printMessage(string("id '") + element.getAttribute("
id").utf8().data() + "'"); |
1240 else | 1240 else |
1241 m_delegate->printMessage("no id"); | 1241 m_delegate->printMessage("no id"); |
1242 } else | 1242 } else |
1243 m_delegate->printMessage(string(" - ") + request.initiatorName().utf
8().data()); | 1243 m_delegate->printMessage(string(" - ") + request.initiatorName().utf
8().data()); |
1244 m_delegate->printMessage(string(" requested '") + URLDescription(request
.urlRequest().url()).c_str() + "'\n"); | 1244 m_delegate->printMessage(string(" requested '") + URLDescription(request
.urlRequest().url()).c_str() + "'\n"); |
1245 } | 1245 } |
1246 } | 1246 } |
1247 | 1247 |
1248 bool WebTestProxyBase::canHandleRequest(WebFrame*, const WebURLRequest& request) | |
1249 { | |
1250 GURL url = request.url(); | |
1251 // Just reject the scheme used in | |
1252 // LayoutTests/http/tests/misc/redirect-to-external-url.html | |
1253 return !url.SchemeIs("spaceballs"); | |
1254 } | |
1255 | |
1256 WebURLError WebTestProxyBase::cannotHandleRequestError(WebFrame*, const WebURLRe
quest& request) | 1248 WebURLError WebTestProxyBase::cannotHandleRequestError(WebFrame*, const WebURLRe
quest& request) |
1257 { | 1249 { |
1258 WebURLError error; | 1250 WebURLError error; |
1259 // A WebKit layout test expects the following values. | 1251 // A WebKit layout test expects the following values. |
1260 // unableToImplementPolicyWithError() below prints them. | 1252 // unableToImplementPolicyWithError() below prints them. |
1261 error.domain = WebString::fromUTF8("WebKitErrorDomain"); | 1253 error.domain = WebString::fromUTF8("WebKitErrorDomain"); |
1262 error.reason = 101; | 1254 error.reason = 101; |
1263 error.unreachableURL = request.url(); | 1255 error.unreachableURL = request.url(); |
1264 return error; | 1256 return error; |
1265 } | 1257 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 { | 1475 { |
1484 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { | 1476 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { |
1485 m_delegate->printMessage("intercepted postMessage\n"); | 1477 m_delegate->printMessage("intercepted postMessage\n"); |
1486 return true; | 1478 return true; |
1487 } | 1479 } |
1488 | 1480 |
1489 return false; | 1481 return false; |
1490 } | 1482 } |
1491 | 1483 |
1492 } | 1484 } |
OLD | NEW |