static WTF::String dumpPath(WebCore::Node* node) { WebCore::Node* parent = node->parentNode(); WTF::String str = WTF::String::format("%s", node->nodeName().utf8().data()); if (parent) { str.append(" > "); str.append(dumpPath(parent)); } return str; }
KURL RegisterMockedUrl(const std::string& urlRoot, const WTF::String& filename) { WebURLResponse response; response.initialize(); response.setMIMEType("text/html"); WTF::String localPath = m_baseFilePath; localPath.append(filename); KURL url = toKURL(urlRoot + filename.utf8().data()); Platform::current()->unitTestSupport()->registerMockedURL(url, response, localPath); return url; }