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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 void WebTestProxyBase::didDetectXSS(WebFrame*, const WebURL&, bool) | 1225 void WebTestProxyBase::didDetectXSS(WebFrame*, const WebURL&, bool) |
1226 { | 1226 { |
1227 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) | 1227 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) |
1228 m_delegate->printMessage("didDetectXSS\n"); | 1228 m_delegate->printMessage("didDetectXSS\n"); |
1229 } | 1229 } |
1230 | 1230 |
1231 void WebTestProxyBase::willRequestResource(WebFrame* frame, const WebKit::WebCac
hedURLRequest& request) | 1231 void WebTestProxyBase::willRequestResource(WebFrame* frame, const WebKit::WebCac
hedURLRequest& request) |
1232 { | 1232 { |
1233 if (m_testInterfaces->testRunner()->shouldDumpResourceRequestCallbacks()) { | 1233 if (m_testInterfaces->testRunner()->shouldDumpResourceRequestCallbacks()) { |
1234 printFrameDescription(m_delegate, frame); | 1234 printFrameDescription(m_delegate, frame); |
1235 WebElement element = request.initiatorElement(); | 1235 m_delegate->printMessage(string(" - ") + request.initiatorName().utf8().
data()); |
1236 if (!element.isNull()) { | |
1237 m_delegate->printMessage(" - element with "); | |
1238 if (element.hasAttribute("id")) | |
1239 m_delegate->printMessage(string("id '") + element.getAttribute("
id").utf8().data() + "'"); | |
1240 else | |
1241 m_delegate->printMessage("no id"); | |
1242 } else | |
1243 m_delegate->printMessage(string(" - ") + request.initiatorName().utf
8().data()); | |
1244 m_delegate->printMessage(string(" requested '") + URLDescription(request
.urlRequest().url()).c_str() + "'\n"); | 1236 m_delegate->printMessage(string(" requested '") + URLDescription(request
.urlRequest().url()).c_str() + "'\n"); |
1245 } | 1237 } |
1246 } | 1238 } |
1247 | 1239 |
1248 WebURLError WebTestProxyBase::cannotHandleRequestError(WebFrame*, const WebURLRe
quest& request) | 1240 WebURLError WebTestProxyBase::cannotHandleRequestError(WebFrame*, const WebURLRe
quest& request) |
1249 { | 1241 { |
1250 WebURLError error; | 1242 WebURLError error; |
1251 // A WebKit layout test expects the following values. | 1243 // A WebKit layout test expects the following values. |
1252 // unableToImplementPolicyWithError() below prints them. | 1244 // unableToImplementPolicyWithError() below prints them. |
1253 error.domain = WebString::fromUTF8("WebKitErrorDomain"); | 1245 error.domain = WebString::fromUTF8("WebKitErrorDomain"); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 { | 1467 { |
1476 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { | 1468 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { |
1477 m_delegate->printMessage("intercepted postMessage\n"); | 1469 m_delegate->printMessage("intercepted postMessage\n"); |
1478 return true; | 1470 return true; |
1479 } | 1471 } |
1480 | 1472 |
1481 return false; | 1473 return false; |
1482 } | 1474 } |
1483 | 1475 |
1484 } | 1476 } |
OLD | NEW |