<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[177542] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/177542">177542</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-12-18 17:00:23 -0800 (Thu, 18 Dec 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Win] Update DumpRenderTree to more closely match Mac version
https://bugs.webkit.org/show_bug.cgi?id=139799
Reviewed by Tim Horton.
Source/WebKit/win:
* Interfaces/IWebSecurityOrigin.idl: Add initializer from URL.
* Interfaces/WebKit.idl: Add CLSID so we can instantiate a
WebSecurityOrigin from COM.
* WebApplicationCache.h: Decorate class declaration with CLSID
to support COM introspection.
* WebSecurityOrigin.cpp: Get rid of meaningless STDMETHODCALLTYPE
declarations inside implementation.
(WebSecurityOrigin::QueryInterface):
(WebSecurityOrigin::AddRef):
(WebSecurityOrigin::Release):
(WebSecurityOrigin::protocol):
(WebSecurityOrigin::host):
(WebSecurityOrigin::port):
(WebSecurityOrigin::usage):
(WebSecurityOrigin::quota):
(WebSecurityOrigin::setQuota):
(WebSecurityOrigin::initWithURL): Added.
* WebSecurityOrigin.h:
Tools:
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::accessibleElementById): Correct
use of BSTR to avoid leak.
* DumpRenderTree/win/DumpRenderTree.cpp: Reorder methods and
update to match Mac version more closely.
(dumpFramesAsText):
(dump):
(resetDefaultsToConsistentValues):
(resetWebViewToConsistentStateBeforeTesting):
(sizeWebViewForCurrentTest):
(runTest):
(openWindows):
(windowToWebViewMap):
(createWebViewAndOffscreenWindow):
(sharedCFURLCache):
(initializeGlobalsFromCommandLineOptions):
(main):
* DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
(TestRunner::addDisallowedURL):
(TestRunner::applicationCacheDiskUsageForOrigin):
(TestRunner::syncLocalStorage):
(TestRunner::localStorageDiskUsageForOrigin):
(TestRunner::observeStorageTrackerNotifications):
(TestRunner::clearApplicationCacheForOrigin):
(TestRunner::originsWithApplicationCache):
(TestRunner::deleteAllLocalStorage):
(TestRunner::setStorageDatabaseIdleInterval):
(TestRunner::closeIdleLocalStorageDatabases):
(TestRunner::originsWithLocalStorage):
(TestRunner::deleteLocalStorageForOrigin):
(TestRunner::copyDecodedHostName):
(TestRunner::copyEncodedHostName):
(TestRunner::keepWebHistory):
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(TestRunner::setAppCacheMaximumSize):
(TestRunner::setCustomPolicyDelegate):
(TestRunner::goBack):
(TestRunner::setDefersLoading):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::setMockDeviceOrientation):
(TestRunner::setMockGeolocationPosition):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setIconDatabaseEnabled):
(TestRunner::setMainFrameIsFirstResponder):
(TestRunner::setSpatialNavigationEnabled):
(TestRunner::setPluginsEnabled):
(TestRunner::setAutomaticLinkDetectionEnabled):
(TestRunner::setUseDashboardCompatibilityMode):
(TestRunner::dispatchPendingLoadRequests):
(TestRunner::findString):
(TestRunner::setCacheModel):
(TestRunner::apiTestNewWindowDataLoadBaseURL):
(TestRunner::setWebViewEditable):
(TestRunner::authenticateSession):
(TestRunner::abortModal):
(TestRunner::setSerializeHTTPLoads):
(TestRunner::addChromeInputField):
(TestRunner::removeChromeInputField):
(TestRunner::focusWebView):
(TestRunner::setBackingScaleFactor):
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesIWebSecurityOriginidl">trunk/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesWebKitidl">trunk/Source/WebKit/win/Interfaces/WebKit.idl</a></li>
<li><a href="#trunkSourceWebKitwinWebApplicationCacheh">trunk/Source/WebKit/win/WebApplicationCache.h</a></li>
<li><a href="#trunkSourceWebKitwinWebSecurityOrigincpp">trunk/Source/WebKit/win/WebSecurityOrigin.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebSecurityOriginh">trunk/Source/WebKit/win/WebSecurityOrigin.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinAccessibilityControllerWincpp">trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">
</span><span class="cx"> return JSObject::getOwnPropertySlotByIndex(thisObject, exec, index, slot);
</span><span class="cx"> }
</span><del>-
</del><ins>+ I
</ins><span class="cx"> static NO_RETURN_DUE_TO_CRASH void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&)
</span><span class="cx"> {
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/ChangeLog        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2014-12-18 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><ins>+ [Win] Update DumpRenderTree to more closely match Mac version
+ https://bugs.webkit.org/show_bug.cgi?id=139799
+
+ Reviewed by Tim Horton.
+
+ * Interfaces/IWebSecurityOrigin.idl: Add initializer from URL.
+ * Interfaces/WebKit.idl: Add CLSID so we can instantiate a
+ WebSecurityOrigin from COM.
+ * WebApplicationCache.h: Decorate class declaration with CLSID
+ to support COM introspection.
+ * WebSecurityOrigin.cpp: Get rid of meaningless STDMETHODCALLTYPE
+ declarations inside implementation.
+ (WebSecurityOrigin::QueryInterface):
+ (WebSecurityOrigin::AddRef):
+ (WebSecurityOrigin::Release):
+ (WebSecurityOrigin::protocol):
+ (WebSecurityOrigin::host):
+ (WebSecurityOrigin::port):
+ (WebSecurityOrigin::usage):
+ (WebSecurityOrigin::quota):
+ (WebSecurityOrigin::setQuota):
+ (WebSecurityOrigin::initWithURL): Added.
+ * WebSecurityOrigin.h:
+
+2014-12-18 Brent Fulgham <bfulgham@apple.com>
+
</ins><span class="cx"> [Win] Correct Windows tests after Bug 139149.
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=139781
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesIWebSecurityOriginidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -47,4 +47,6 @@
</span><span class="cx">
</span><span class="cx"> HRESULT quota([out, retval] unsigned long long* result);
</span><span class="cx"> HRESULT setQuota([in] unsigned long long quota);
</span><ins>+
+ HRESULT initWithURL([in] BSTR);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesWebKitidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/WebKit.idl (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/WebKit.idl        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/Interfaces/WebKit.idl        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -295,4 +295,9 @@
</span><span class="cx"> coclass WebUserContentURLPattern {
</span><span class="cx"> [default] interface IWebUserContentURLPattern;
</span><span class="cx"> }
</span><ins>+
+ [uuid(6eb8d98f-2723-4472-88d3-5936f9d6e631)]
+ coclass WebSecurityOrigin {
+ [default] interface IWebSecurityOrigin;
+ };
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebApplicationCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebApplicationCache.h (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebApplicationCache.h        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/WebApplicationCache.h        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "WebKit.h"
</span><span class="cx">
</span><del>-class WebApplicationCache : public IWebApplicationCache {
</del><ins>+class DECLSPEC_UUID("1119E970-4B13-4B9A-A049-41096104B689") WebApplicationCache : public IWebApplicationCache {
</ins><span class="cx"> public:
</span><span class="cx"> static WebApplicationCache* createInstance();
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebSecurityOrigincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebSecurityOrigin.cpp (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebSecurityOrigin.cpp        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/WebSecurityOrigin.cpp        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -29,8 +29,10 @@
</span><span class="cx"> #include "WebSecurityOrigin.h"
</span><span class="cx"> #include "WebKitDLL.h"
</span><span class="cx">
</span><ins>+#include "MarshallingHelpers.h"
</ins><span class="cx"> #include <WebCore/BString.h>
</span><span class="cx"> #include <WebCore/DatabaseManager.h>
</span><ins>+#include <WebCore/URL.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -57,7 +59,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // IUnknown ------------------------------------------------------------------------
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT WebSecurityOrigin::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -73,12 +75,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE WebSecurityOrigin::AddRef()
</del><ins>+ULONG WebSecurityOrigin::AddRef()
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE WebSecurityOrigin::Release()
</del><ins>+ULONG WebSecurityOrigin::Release()
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -89,8 +91,7 @@
</span><span class="cx">
</span><span class="cx"> // IWebSecurityOrigin --------------------------------------------------------------
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::protocol(
- /* [retval][out] */ BSTR* result)
</del><ins>+HRESULT WebSecurityOrigin::protocol(/* [retval][out] */ BSTR* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -100,8 +101,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::host(
- /* [retval][out] */ BSTR* result)
</del><ins>+HRESULT WebSecurityOrigin::host(/* [retval][out] */ BSTR* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -111,8 +111,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::port(
- /* [retval][out] */ unsigned short* result)
</del><ins>+HRESULT WebSecurityOrigin::port(/* [retval][out] */ unsigned short* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -122,8 +121,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::usage(
- /* [retval][out] */ unsigned long long* result)
</del><ins>+HRESULT WebSecurityOrigin::usage(/* [retval][out] */ unsigned long long* result)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> if (!result)
</span><span class="lines">@@ -138,8 +136,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::quota(
- /* [retval][out] */ unsigned long long* result)
</del><ins>+HRESULT WebSecurityOrigin::quota(/* [retval][out] */ unsigned long long* result)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> if (!result)
</span><span class="lines">@@ -153,8 +150,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE WebSecurityOrigin::setQuota(
- /* [in] */ unsigned long long quota)
</del><ins>+HRESULT WebSecurityOrigin::setQuota(/* [in] */ unsigned long long quota)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> DatabaseManager::manager().setQuota(m_securityOrigin.get(), quota);
</span><span class="lines">@@ -165,3 +161,10 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><ins>+
+HRESULT WebSecurityOrigin::initWithURL(/* [in] */ BSTR urlBstr)
+{
+ m_securityOrigin = WebCore::SecurityOrigin::create(MarshallingHelpers::BSTRToKURL(urlBstr));
+
+ return S_OK;
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitwinWebSecurityOriginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebSecurityOrigin.h (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebSecurityOrigin.h        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Source/WebKit/win/WebSecurityOrigin.h        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -67,6 +67,8 @@
</span><span class="cx"> virtual HRESULT STDMETHODCALLTYPE setQuota(
</span><span class="cx"> /* [in] */ unsigned long long quota);
</span><span class="cx">
</span><ins>+ virtual HRESULT STDMETHODCALLTYPE initWithURL(/*[in]*/ BSTR);
+
</ins><span class="cx"> private:
</span><span class="cx"> WebSecurityOrigin(WebCore::SecurityOrigin*);
</span><span class="cx"> ~WebSecurityOrigin();
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Tools/ChangeLog        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2014-12-18 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Update DumpRenderTree to more closely match Mac version
+ https://bugs.webkit.org/show_bug.cgi?id=139799
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ (AccessibilityController::accessibleElementById): Correct
+ use of BSTR to avoid leak.
+ * DumpRenderTree/win/DumpRenderTree.cpp: Reorder methods and
+ update to match Mac version more closely.
+ (dumpFramesAsText):
+ (dump):
+ (resetDefaultsToConsistentValues):
+ (resetWebViewToConsistentStateBeforeTesting):
+ (sizeWebViewForCurrentTest):
+ (runTest):
+ (openWindows):
+ (windowToWebViewMap):
+ (createWebViewAndOffscreenWindow):
+ (sharedCFURLCache):
+ (initializeGlobalsFromCommandLineOptions):
+ (main):
+ * DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
+ (TestRunner::addDisallowedURL):
+ (TestRunner::applicationCacheDiskUsageForOrigin):
+ (TestRunner::syncLocalStorage):
+ (TestRunner::localStorageDiskUsageForOrigin):
+ (TestRunner::observeStorageTrackerNotifications):
+ (TestRunner::clearApplicationCacheForOrigin):
+ (TestRunner::originsWithApplicationCache):
+ (TestRunner::deleteAllLocalStorage):
+ (TestRunner::setStorageDatabaseIdleInterval):
+ (TestRunner::closeIdleLocalStorageDatabases):
+ (TestRunner::originsWithLocalStorage):
+ (TestRunner::deleteLocalStorageForOrigin):
+ (TestRunner::copyDecodedHostName):
+ (TestRunner::copyEncodedHostName):
+ (TestRunner::keepWebHistory):
+ (TestRunner::numberOfPendingGeolocationPermissionRequests):
+ (TestRunner::setAppCacheMaximumSize):
+ (TestRunner::setCustomPolicyDelegate):
+ (TestRunner::goBack):
+ (TestRunner::setDefersLoading):
+ (TestRunner::setDomainRelaxationForbiddenForURLScheme):
+ (TestRunner::setMockDeviceOrientation):
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ (TestRunner::setIconDatabaseEnabled):
+ (TestRunner::setMainFrameIsFirstResponder):
+ (TestRunner::setSpatialNavigationEnabled):
+ (TestRunner::setPluginsEnabled):
+ (TestRunner::setAutomaticLinkDetectionEnabled):
+ (TestRunner::setUseDashboardCompatibilityMode):
+ (TestRunner::dispatchPendingLoadRequests):
+ (TestRunner::findString):
+ (TestRunner::setCacheModel):
+ (TestRunner::apiTestNewWindowDataLoadBaseURL):
+ (TestRunner::setWebViewEditable):
+ (TestRunner::authenticateSession):
+ (TestRunner::abortModal):
+ (TestRunner::setSerializeHTTPLoads):
+ (TestRunner::addChromeInputField):
+ (TestRunner::removeChromeInputField):
+ (TestRunner::focusWebView):
+ (TestRunner::setBackingScaleFactor):
+ (TestRunner::grantWebNotificationPermission):
+ (TestRunner::denyWebNotificationPermission):
+ (TestRunner::removeAllWebNotificationPermissions):
+ (TestRunner::simulateWebNotificationClick):
+
</ins><span class="cx"> 2014-12-18 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Add strong typing to RefCounter interface, return value as a bool.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinAccessibilityControllerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -123,12 +123,9 @@
</span><span class="cx"> {
</span><span class="cx"> AccessibilityUIElement rootAccessibilityUIElement = rootElement();
</span><span class="cx">
</span><del>- BSTR idAttribute = JSStringCopyBSTR(id);
</del><ins>+ _bstr_t idAttribute(JSStringCopyBSTR(id), false);
</ins><span class="cx">
</span><span class="cx"> COMPtr<IAccessible> result = findAccessibleObjectById(rootAccessibilityUIElement, idAttribute);
</span><del>-
- ::SysFreeString(idAttribute);
-
</del><span class="cx"> if (result)
</span><span class="cx"> return AccessibilityUIElement(result);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -50,8 +50,10 @@
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <string.h>
</span><span class="cx"> #include <tchar.h>
</span><ins>+#include <wtf/NeverDestroyed.h>
</ins><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><ins>+#include <wtf/text/CString.h>
</ins><span class="cx"> #include <windows.h>
</span><span class="cx"> #include <CoreFoundation/CoreFoundation.h>
</span><span class="cx"> #include <WebCore/FileSystem.h>
</span><span class="lines">@@ -81,14 +83,17 @@
</span><span class="cx">
</span><span class="cx"> const LPCWSTR kDumpRenderTreeClassName = L"DumpRenderTreeWindow";
</span><span class="cx">
</span><ins>+static bool dumpPixelsForAllTests = false;
+static bool dumpPixelsForCurrentTest = false;
+static bool threaded = false;
</ins><span class="cx"> static bool dumpTree = true;
</span><del>-static bool dumpPixelsForAllTests = false;
-static bool dumpPixelsForCurrentTest;
</del><ins>+static bool useTimeoutWatchdog = true;
+static bool forceComplexText = false;
</ins><span class="cx"> static bool dumpAllPixels;
</span><del>-static bool printSeparators;
</del><ins>+static bool useAcceleratedDrawing = true; // Not used
+static bool gcBetweenTests = false;
+static bool printSeparators = false;
</ins><span class="cx"> static bool leakChecking = false;
</span><del>-static bool threaded = false;
-static bool forceComplexText = false;
</del><span class="cx"> static bool printSupportedFeatures = false;
</span><span class="cx"> static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
</span><span class="cx">
</span><span class="lines">@@ -433,6 +438,7 @@
</span><span class="cx"> COMPtr<IWebFrame> parent;
</span><span class="cx"> if (FAILED(frame->parentFrame(&parent)))
</span><span class="cx"> return L"";
</span><ins>+
</ins><span class="cx"> if (parent) {
</span><span class="cx"> _bstr_t name;
</span><span class="cx"> if (FAILED(frame->name(&name.GetBSTR())))
</span><span class="lines">@@ -455,14 +461,15 @@
</span><span class="cx"> COMPtr<IEnumVARIANT> enumKids;
</span><span class="cx"> if (FAILED(frame->childFrames(&enumKids)))
</span><span class="cx"> return L"";
</span><ins>+
</ins><span class="cx"> VARIANT var;
</span><del>- VariantInit(&var);
</del><ins>+ ::VariantInit(&var);
</ins><span class="cx"> while (enumKids->Next(1, &var, 0) == S_OK) {
</span><span class="cx"> ASSERT(V_VT(&var) == VT_UNKNOWN);
</span><span class="cx"> COMPtr<IWebFrame> framePtr;
</span><span class="cx"> V_UNKNOWN(&var)->QueryInterface(IID_IWebFrame, (void**)&framePtr);
</span><span class="cx"> result.append(dumpFramesAsText(framePtr.get()));
</span><del>- VariantClear(&var);
</del><ins>+ ::VariantClear(&var);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -667,25 +674,26 @@
</span><span class="cx">
</span><span class="cx"> void dump()
</span><span class="cx"> {
</span><ins>+ ::InvalidateRect(webViewWindow, 0, TRUE);
+ ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
+
</ins><span class="cx"> invalidateAnyPreviousWaitToDumpWatchdog();
</span><ins>+ ASSERT(!gTestRunner->hasPendingWebNotificationClick());
</ins><span class="cx">
</span><del>- COMPtr<IWebDataSource> dataSource;
- if (SUCCEEDED(frame->dataSource(&dataSource))) {
- COMPtr<IWebURLResponse> response;
- if (SUCCEEDED(dataSource->response(&response)) && response) {
- _bstr_t mimeType;
- if (SUCCEEDED(response->MIMEType(&mimeType.GetBSTR())) && !_tcscmp(static_cast<TCHAR*>(mimeType), TEXT("text/plain"))) {
- ::gTestRunner->setDumpAsText(true);
- ::gTestRunner->setGeneratePixelResults(false);
- }
- }
- }
-
</del><span class="cx"> _bstr_t resultString;
</span><span class="cx">
</span><span class="cx"> if (dumpTree) {
</span><del>- ::InvalidateRect(webViewWindow, 0, TRUE);
- ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
</del><ins>+ COMPtr<IWebDataSource> dataSource;
+ if (SUCCEEDED(frame->dataSource(&dataSource))) {
+ COMPtr<IWebURLResponse> response;
+ if (SUCCEEDED(dataSource->response(&response)) && response) {
+ _bstr_t mimeType;
+ if (SUCCEEDED(response->MIMEType(&mimeType.GetBSTR())) && !_tcscmp(static_cast<TCHAR*>(mimeType), TEXT("text/plain"))) {
+ ::gTestRunner->setDumpAsText(true);
+ ::gTestRunner->setGeneratePixelResults(false);
+ }
+ }
+ }
</ins><span class="cx">
</span><span class="cx"> if (::gTestRunner->dumpAsText()) {
</span><span class="cx"> resultString = dumpFramesAsText(frame).data();
</span><span class="lines">@@ -719,9 +727,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (dumpPixelsForCurrentTest
</span><del>- && gTestRunner->generatePixelResults()
- && !gTestRunner->dumpDOMAsWebArchive()
- && !gTestRunner->dumpSourceAsWebArchive())
</del><ins>+ && gTestRunner->generatePixelResults()
+ && !gTestRunner->dumpDOMAsWebArchive()
+ && !gTestRunner->dumpSourceAsWebArchive())
</ins><span class="cx"> dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner->expectedPixelHash());
</span><span class="cx">
</span><span class="cx"> printf("#EOF\n"); // terminate the (possibly empty) pixels block
</span><span class="lines">@@ -730,7 +738,7 @@
</span><span class="cx">
</span><span class="cx"> fail:
</span><span class="cx"> // This will exit from our message loop.
</span><del>- PostQuitMessage(0);
</del><ins>+ ::PostQuitMessage(0);
</ins><span class="cx"> done = true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -756,6 +764,14 @@
</span><span class="cx">
</span><span class="cx"> static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
</span><span class="cx"> {
</span><ins>+ ASSERT(preferences);
+
+ preferences->setAutosaves(FALSE);
+
+ COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
+ ASSERT(prefsPrivate);
+ prefsPrivate->setFullScreenEnabled(TRUE);
+
</ins><span class="cx"> #ifdef USE_MAC_FONTS
</span><span class="cx"> static _bstr_t standardFamily(TEXT("Times"));
</span><span class="cx"> static _bstr_t fixedFamily(TEXT("Courier"));
</span><span class="lines">@@ -772,6 +788,8 @@
</span><span class="cx"> static _bstr_t pictographFamily(TEXT("Times New Roman"));
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ prefsPrivate->setAllowUniversalAccessFromFileURLs(TRUE);
+ prefsPrivate->setAllowFileAccessFromFileURLs(TRUE);
</ins><span class="cx"> preferences->setStandardFontFamily(standardFamily);
</span><span class="cx"> preferences->setFixedFontFamily(fixedFamily);
</span><span class="cx"> preferences->setSerifFontFamily(standardFamily);
</span><span class="lines">@@ -779,28 +797,34 @@
</span><span class="cx"> preferences->setCursiveFontFamily(cursiveFamily);
</span><span class="cx"> preferences->setFantasyFontFamily(fantasyFamily);
</span><span class="cx"> preferences->setPictographFontFamily(pictographFamily);
</span><del>-
- preferences->setAutosaves(FALSE);
</del><span class="cx"> preferences->setDefaultFontSize(16);
</span><span class="cx"> preferences->setDefaultFixedFontSize(13);
</span><span class="cx"> preferences->setMinimumFontSize(0);
</span><span class="cx"> preferences->setDefaultTextEncodingName(L"ISO-8859-1");
</span><span class="cx"> preferences->setJavaEnabled(FALSE);
</span><del>- preferences->setPlugInsEnabled(TRUE);
- preferences->setDOMPasteAllowed(TRUE);
</del><ins>+ preferences->setJavaScriptEnabled(TRUE);
</ins><span class="cx"> preferences->setEditableLinkBehavior(WebKitEditableLinkOnlyLiveWithShiftKey);
</span><del>- preferences->setFontSmoothing(FontSmoothingTypeStandard);
- preferences->setUsesPageCache(FALSE);
- preferences->setPrivateBrowsingEnabled(FALSE);
- preferences->setJavaScriptCanOpenWindowsAutomatically(TRUE);
- preferences->setJavaScriptEnabled(TRUE);
</del><span class="cx"> preferences->setTabsToLinks(FALSE);
</span><ins>+ preferences->setDOMPasteAllowed(TRUE);
</ins><span class="cx"> preferences->setShouldPrintBackgrounds(TRUE);
</span><span class="cx"> preferences->setCacheModel(WebCacheModelDocumentBrowser);
</span><del>- preferences->setLoadsImagesAutomatically(TRUE);
</del><ins>+ prefsPrivate->setXSSAuditorEnabled(FALSE);
+ prefsPrivate->setExperimentalNotificationsEnabled(FALSE);
+ preferences->setPlugInsEnabled(TRUE);
</ins><span class="cx"> preferences->setTextAreasAreResizable(TRUE);
</span><del>- preferences->setCSSRegionsEnabled(TRUE);
</del><span class="cx">
</span><ins>+ preferences->setPrivateBrowsingEnabled(FALSE);
+ prefsPrivate->setAuthorAndUserStylesEnabled(TRUE);
+ // Shrinks standalone images to fit: YES
+ preferences->setJavaScriptCanOpenWindowsAutomatically(TRUE);
+ prefsPrivate->setJavaScriptCanAccessClipboard(TRUE);
+ prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE);
+ prefsPrivate->setDeveloperExtrasEnabled(FALSE);
+ // Set JS experiments enabled: YES
+ preferences->setLoadsImagesAutomatically(TRUE);
+ prefsPrivate->setLoadsSiteIconsIgnoringImageLoadingPreference(FALSE);
+ prefsPrivate->setFrameFlatteningEnabled(FALSE);
+ // Set spatial navigation enabled: NO
</ins><span class="cx"> if (persistentUserStyleSheetLocation) {
</span><span class="cx"> Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
</span><span class="cx"> CFStringGetCharacters(persistentUserStyleSheetLocation.get(), CFRangeMake(0, CFStringGetLength(persistentUserStyleSheetLocation.get())), (UniChar *)urlCharacters.data());
</span><span class="lines">@@ -810,26 +834,19 @@
</span><span class="cx"> } else
</span><span class="cx"> preferences->setUserStyleSheetEnabled(FALSE);
</span><span class="cx">
</span><del>- COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
- if (prefsPrivate) {
- prefsPrivate->setAllowUniversalAccessFromFileURLs(TRUE);
- prefsPrivate->setAllowFileAccessFromFileURLs(TRUE);
- prefsPrivate->setAuthorAndUserStylesEnabled(TRUE);
- prefsPrivate->setDeveloperExtrasEnabled(FALSE);
- prefsPrivate->setExperimentalNotificationsEnabled(TRUE);
- prefsPrivate->setShouldPaintNativeControls(TRUE); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592>
- prefsPrivate->setJavaScriptCanAccessClipboard(TRUE);
- prefsPrivate->setXSSAuditorEnabled(FALSE);
- prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE);
- prefsPrivate->setLoadsSiteIconsIgnoringImageLoadingPreference(FALSE);
- prefsPrivate->setFrameFlatteningEnabled(FALSE);
- prefsPrivate->setFullScreenEnabled(TRUE);
</del><span class="cx"> #if USE(CG)
</span><del>- prefsPrivate->setAcceleratedCompositingEnabled(TRUE);
</del><ins>+ prefsPrivate->setAcceleratedCompositingEnabled(TRUE);
</ins><span class="cx"> #endif
</span><del>- prefsPrivate->setMockScrollbarsEnabled(TRUE);
- prefsPrivate->setScreenFontSubstitutionEnabled(TRUE);
- }
</del><ins>+ // Set WebGL Enabled: NO
+ preferences->setCSSRegionsEnabled(TRUE);
+ // Set uses HTML5 parser quirks: NO
+ // Async spellcheck: NO
+ prefsPrivate->setShouldPaintNativeControls(TRUE); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592>
+ prefsPrivate->setMockScrollbarsEnabled(TRUE);
+
+ preferences->setFontSmoothing(FontSmoothingTypeStandard);
+ prefsPrivate->setScreenFontSubstitutionEnabled(TRUE);
+
</ins><span class="cx"> setAlwaysAcceptCookies(false);
</span><span class="cx">
</span><span class="cx"> setlocale(LC_ALL, "");
</span><span class="lines">@@ -841,17 +858,28 @@
</span><span class="cx"> if (FAILED(frame->webView(&webView)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- webView->setPolicyDelegate(0);
- policyDelegate->setPermissive(false);
- policyDelegate->setControllerToNotifyDone(0);
-
</del><span class="cx"> COMPtr<IWebIBActions> webIBActions(Query, webView);
</span><span class="cx"> if (webIBActions) {
</span><span class="cx"> webIBActions->makeTextStandardSize(0);
</span><span class="cx"> webIBActions->resetPageZoom(0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
+ if (webViewPrivate)
+ webViewPrivate->setTabKeyCyclesThroughElements(TRUE);
</ins><span class="cx">
</span><ins>+ webView->setPolicyDelegate(nullptr);
+ policyDelegate->setPermissive(false);
+ policyDelegate->setControllerToNotifyDone(nullptr);
+ sharedFrameLoadDelegate->resetToConsistentState();
+
+ if (webViewPrivate) {
+ webViewPrivate->clearMainFrameName();
+ _bstr_t groupName;
+ if (SUCCEEDED(webView->groupName(&groupName.GetBSTR())))
+ webViewPrivate->removeAllUserContentFromGroup(groupName);
+ }
+
</ins><span class="cx"> COMPtr<IWebPreferences> preferences;
</span><span class="cx"> if (SUCCEEDED(webView->preferences(&preferences)))
</span><span class="cx"> resetDefaultsToConsistentValues(preferences.get());
</span><span class="lines">@@ -861,25 +889,14 @@
</span><span class="cx"> WebCoreTestSupport::resetInternalsObject(context);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
- if (!webViewPrivate)
- return;
-
</del><span class="cx"> HWND viewWindow;
</span><del>- if (SUCCEEDED(webViewPrivate->viewWindow(&viewWindow)) && viewWindow)
- SetFocus(viewWindow);
</del><ins>+ if (webViewPrivate && SUCCEEDED(webViewPrivate->viewWindow(&viewWindow)) && viewWindow)
+ ::SetFocus(viewWindow);
</ins><span class="cx">
</span><del>- webViewPrivate->clearMainFrameName();
</del><span class="cx"> webViewPrivate->resetOriginAccessWhitelists();
</span><span class="cx">
</span><del>- _bstr_t groupName;
- if (SUCCEEDED(webView->groupName(&groupName.GetBSTR())))
- webViewPrivate->removeAllUserContentFromGroup(groupName);
-
</del><span class="cx"> sharedUIDelegate->resetUndoManager();
</span><span class="cx">
</span><del>- sharedFrameLoadDelegate->resetToConsistentState();
-
</del><span class="cx"> COMPtr<IWebFramePrivate> framePrivate;
</span><span class="cx"> if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
</span><span class="cx"> framePrivate->clearOpener();
</span><span class="lines">@@ -888,15 +905,8 @@
</span><span class="cx"> static void sizeWebViewForCurrentTest()
</span><span class="cx"> {
</span><span class="cx"> bool isSVGW3CTest = (gTestRunner->testURL().find("svg\\W3C-SVG-1.1") != string::npos);
</span><del>- unsigned width;
- unsigned height;
- if (isSVGW3CTest) {
- width = TestRunner::w3cSVGViewWidth;
- height = TestRunner::w3cSVGViewHeight;
- } else {
- width = TestRunner::viewWidth;
- height = TestRunner::viewHeight;
- }
</del><ins>+ unsigned width = isSVGW3CTest ? TestRunner::w3cSVGViewWidth : TestRunner::viewWidth;
+ unsigned height = isSVGW3CTest ? TestRunner::w3cSVGViewHeight : TestRunner::viewHeight;
</ins><span class="cx">
</span><span class="cx"> ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
</span><span class="cx"> }
</span><span class="lines">@@ -1017,6 +1027,8 @@
</span><span class="cx">
</span><span class="cx"> addFontFallbackIfPresent(fallbackPath);
</span><span class="cx">
</span><ins>+ resetWebViewToConsistentStateBeforeTesting();
+
</ins><span class="cx"> sizeWebViewForCurrentTest();
</span><span class="cx"> gTestRunner->setIconDatabaseEnabled(false);
</span><span class="cx"> gTestRunner->clearAllApplicationCaches();
</span><span class="lines">@@ -1032,15 +1044,10 @@
</span><span class="cx"> gTestRunner->setDumpHistoryDelegateCallbacks(true);
</span><span class="cx"> viewPrivate->setHistoryDelegate(sharedHistoryDelegate.get());
</span><span class="cx"> } else
</span><del>- viewPrivate->setHistoryDelegate(0);
</del><ins>+ viewPrivate->setHistoryDelegate(nullptr);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- COMPtr<IWebHistory> history;
- if (SUCCEEDED(WebKitCreateInstance(CLSID_WebHistory, 0, __uuidof(history), reinterpret_cast<void**>(&history))))
- history->setOptionalSharedHistory(0);
</del><span class="cx">
</span><del>- resetWebViewToConsistentStateBeforeTesting();
-
</del><span class="cx"> if (shouldEnableDeveloperExtras(pathOrURL.c_str())) {
</span><span class="cx"> gTestRunner->setDeveloperExtrasEnabled(true);
</span><span class="cx"> if (shouldDumpAsText(pathOrURL.c_str())) {
</span><span class="lines">@@ -1049,13 +1056,15 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- prevTestBFItem = 0;
- if (webView) {
- COMPtr<IWebBackForwardList> bfList;
- if (SUCCEEDED(webView->backForwardList(&bfList)))
- bfList->currentItem(&prevTestBFItem);
- }
</del><ins>+ COMPtr<IWebHistory> history;
+ if (SUCCEEDED(WebKitCreateInstance(CLSID_WebHistory, 0, __uuidof(history), reinterpret_cast<void**>(&history))))
+ history->setOptionalSharedHistory(nullptr);
</ins><span class="cx">
</span><ins>+ prevTestBFItem = nullptr;
+ COMPtr<IWebBackForwardList> bfList;
+ if (webView && SUCCEEDED(webView->backForwardList(&bfList)))
+ bfList->currentItem(&prevTestBFItem);
+
</ins><span class="cx"> WorkQueue::shared()->clear();
</span><span class="cx"> WorkQueue::shared()->setFrozen(false);
</span><span class="cx">
</span><span class="lines">@@ -1077,7 +1086,7 @@
</span><span class="cx"> #if USE(CF)
</span><span class="cx"> CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);
</span><span class="cx"> #endif
</span><del>- if (!GetMessage(&msg, 0, 0, 0))
</del><ins>+ if (!::GetMessage(&msg, 0, 0, 0))
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> // We get spurious WM_MOUSELEAVE events which make event handling machinery think that mouse button
</span><span class="lines">@@ -1085,19 +1094,13 @@
</span><span class="cx"> // Mouse can never leave WebView during normal DumpRenderTree operation, so we just ignore all such events.
</span><span class="cx"> if (msg.message == WM_MOUSELEAVE)
</span><span class="cx"> continue;
</span><del>- TranslateMessage(&msg);
- DispatchMessage(&msg);
</del><ins>+ ::TranslateMessage(&msg);
+ ::DispatchMessage(&msg);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (shouldEnableDeveloperExtras(pathOrURL.c_str())) {
- gTestRunner->closeWebInspector();
- gTestRunner->setDeveloperExtrasEnabled(false);
- }
</del><ins>+ // EventSendingController clearSavedEvents
+ WorkQueue::shared()->clear();
</ins><span class="cx">
</span><del>- resetWebViewToConsistentStateBeforeTesting();
-
- frame->stopLoading();
-
</del><span class="cx"> if (::gTestRunner->closeRemainingWindowsWhenComplete()) {
</span><span class="cx"> Vector<HWND> windows = openWindows();
</span><span class="cx"> unsigned size = windows.size();
</span><span class="lines">@@ -1108,10 +1111,19 @@
</span><span class="cx"> if (window == hostWindow)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- DestroyWindow(window);
</del><ins>+ ::DestroyWindow(window);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (shouldEnableDeveloperExtras(pathOrURL.c_str())) {
+ gTestRunner->closeWebInspector();
+ gTestRunner->setDeveloperExtrasEnabled(false);
+ }
+
+ resetWebViewToConsistentStateBeforeTesting();
+
+ frame->stopLoading();
+
</ins><span class="cx"> exit:
</span><span class="cx"> removeFontFallbackIfPresent(fallbackPath);
</span><span class="cx"> ::gTestRunner.clear();
</span><span class="lines">@@ -1121,13 +1133,13 @@
</span><span class="cx">
</span><span class="cx"> Vector<HWND>& openWindows()
</span><span class="cx"> {
</span><del>- static Vector<HWND> vector;
</del><ins>+ static NeverDestroyed<Vector<HWND>> vector;
</ins><span class="cx"> return vector;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WindowToWebViewMap& windowToWebViewMap()
</span><span class="cx"> {
</span><del>- static WindowToWebViewMap map;
</del><ins>+ static NeverDestroyed<WindowToWebViewMap> map;
</ins><span class="cx"> return map;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1138,26 +1150,25 @@
</span><span class="cx"> HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP,
</span><span class="cx"> -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0);
</span><span class="cx">
</span><del>- IWebView* webView;
-
</del><ins>+ IWebView* webView = nullptr;
</ins><span class="cx"> HRESULT hr = WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, (void**)&webView);
</span><span class="cx"> if (FAILED(hr)) {
</span><span class="cx"> fprintf(stderr, "Failed to create CLSID_WebView instance, error 0x%x\n", hr);
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (FAILED(webView->setHostWindow(hostWindow)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> RECT clientRect;
</span><span class="cx"> clientRect.bottom = clientRect.left = clientRect.top = clientRect.right = 0;
</span><span class="cx"> _bstr_t groupName(L"org.webkit.DumpRenderTree");
</span><span class="cx"> if (FAILED(webView->initWithFrame(clientRect, 0, groupName)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> COMPtr<IWebViewPrivate> viewPrivate;
</span><span class="cx"> if (FAILED(webView->QueryInterface(&viewPrivate)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> viewPrivate->setShouldApplyMacFontAscentHack(TRUE);
</span><span class="cx"> viewPrivate->setAlwaysUsesComplexTextCodePath(forceComplexText);
</span><span class="lines">@@ -1166,38 +1177,38 @@
</span><span class="cx"> _tcscpy(static_cast<TCHAR*>(pluginPath), exePath().c_str());
</span><span class="cx"> _tcscat(static_cast<TCHAR*>(pluginPath), TestPluginDir);
</span><span class="cx"> if (FAILED(viewPrivate->addAdditionalPluginDirectory(pluginPath)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> HWND viewWindow;
</span><span class="cx"> if (FAILED(viewPrivate->viewWindow(&viewWindow)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> if (webViewWindow)
</span><span class="cx"> *webViewWindow = viewWindow;
</span><span class="cx">
</span><del>- SetWindowPos(viewWindow, 0, 0, 0, maxViewWidth, maxViewHeight, 0);
- ShowWindow(hostWindow, SW_SHOW);
</del><ins>+ ::SetWindowPos(viewWindow, 0, 0, 0, maxViewWidth, maxViewHeight, 0);
+ ::ShowWindow(hostWindow, SW_SHOW);
</ins><span class="cx">
</span><span class="cx"> if (FAILED(webView->setFrameLoadDelegate(sharedFrameLoadDelegate.get())))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (FAILED(viewPrivate->setFrameLoadDelegatePrivate(sharedFrameLoadDelegate.get())))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (FAILED(webView->setUIDelegate(sharedUIDelegate.get())))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> COMPtr<IWebViewEditing> viewEditing;
</span><span class="cx"> if (FAILED(webView->QueryInterface(&viewEditing)))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (FAILED(viewEditing->setEditingDelegate(sharedEditingDelegate.get())))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ResourceLoadDelegate* resourceLoadDelegate = new ResourceLoadDelegate();
</span><span class="cx"> HRESULT result = webView->setResourceLoadDelegate(resourceLoadDelegate);
</span><span class="cx"> resourceLoadDelegate->Release(); // The delegate is owned by the WebView, so release our reference to it.
</span><span class="cx"> if (FAILED(result))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> openWindows().append(hostWindow);
</span><span class="cx"> windowToWebViewMap().set(hostWindow, webView);
</span><span class="lines">@@ -1213,7 +1224,7 @@
</span><span class="cx"> HMODULE module = GetModuleHandle(TEXT("CFNetwork_debug.dll"));
</span><span class="cx"> #endif
</span><span class="cx"> if (!module)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> typedef CFURLCacheRef (*CFURLCacheCopySharedURLCacheProcPtr)(void);
</span><span class="cx"> if (CFURLCacheCopySharedURLCacheProcPtr copyCache = reinterpret_cast<CFURLCacheCopySharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheCopySharedURLCache")))
</span><span class="lines">@@ -1223,7 +1234,7 @@
</span><span class="cx"> if (CFURLCacheSharedURLCacheProcPtr sharedCache = reinterpret_cast<CFURLCacheSharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheSharedURLCache")))
</span><span class="cx"> return sharedCache();
</span><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1234,42 +1245,53 @@
</span><span class="cx"> return EXCEPTION_CONTINUE_SEARCH;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int main(int argc, const char* argv[])
</del><ins>+static Vector<const char*> initializeGlobalsFromCommandLineOptions(int argc, const char* argv[])
</ins><span class="cx"> {
</span><del>-#ifdef _CRTDBG_MAP_ALLOC
- _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
- _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
-#endif
</del><ins>+ Vector<const char*> tests;
</ins><span class="cx">
</span><del>- // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
- // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
- // error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
- ::SetErrorMode(0);
</del><ins>+ for (int i = 1; i < argc; ++i) {
+ if (!stricmp(argv[i], "--notree")) {
+ dumpTree = false;
+ continue;
+ }
</ins><span class="cx">
</span><del>- ::SetUnhandledExceptionFilter(exceptionFilter);
</del><ins>+ if (!stricmp(argv[i], "--pixel-tests")) {
+ dumpPixelsForAllTests = true;
+ continue;
+ }
</ins><span class="cx">
</span><del>- leakChecking = false;
</del><ins>+ if (!stricmp(argv[i], "--tree")) {
+ dumpTree = true;
+ continue;
+ }
</ins><span class="cx">
</span><del>- _setmode(1, _O_BINARY);
- _setmode(2, _O_BINARY);
</del><ins>+ if (!stricmp(argv[i], "--threaded")) {
+ threaded = true;
+ continue;
+ }
</ins><span class="cx">
</span><del>- initialize();
</del><ins>+ if (!stricmp(argv[i], "--complex-text")) {
+ forceComplexText = true;
+ continue;
+ }
</ins><span class="cx">
</span><del>- Vector<const char*> tests;
</del><ins>+ if (!stricmp(argv[i], "--accelerated-drawing")) {
+ useAcceleratedDrawing = true;
+ continue;
+ }
</ins><span class="cx">
</span><del>- for (int i = 1; i < argc; ++i) {
- if (!stricmp(argv[i], "--threaded")) {
- threaded = true;
</del><ins>+ if (!stricmp(argv[i], "--gc-between-tests")) {
+ gcBetweenTests = true;
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!stricmp(argv[i], "--dump-all-pixels")) {
- dumpAllPixels = true;
</del><ins>+ if (!stricmp(argv[i], "--no-timeout")) {
+ useTimeoutWatchdog = false;
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!stricmp(argv[i], "--complex-text")) {
- forceComplexText = true;
</del><ins>+ if (!stricmp(argv[i], "--dump-all-pixels")) {
+ dumpAllPixels = true;
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1278,14 +1300,35 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!stricmp(argv[i], "--pixel-tests")) {
- dumpPixelsForAllTests = true;
- continue;
- }
-
</del><span class="cx"> tests.append(argv[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ return tests;
+}
+
+int main(int argc, const char* argv[])
+{
+#ifdef _CRTDBG_MAP_ALLOC
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+#endif
+
+ // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
+ // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
+ // error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
+ ::SetErrorMode(0);
+
+ ::SetUnhandledExceptionFilter(exceptionFilter);
+
+ leakChecking = false;
+
+ _setmode(1, _O_BINARY);
+ _setmode(2, _O_BINARY);
+
+ initialize();
+
+ Vector<const char*> tests = initializeGlobalsFromCommandLineOptions(argc, argv);
+
</ins><span class="cx"> policyDelegate = new PolicyDelegate();
</span><span class="cx"> sharedFrameLoadDelegate.adoptRef(new FrameLoadDelegate);
</span><span class="cx"> sharedUIDelegate.adoptRef(new UIDelegate);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (177541 => 177542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2014-12-19 00:51:47 UTC (rev 177541)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2014-12-19 01:00:23 UTC (rev 177542)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx"> void TestRunner::addDisallowedURL(JSStringRef url)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement!
</span><ins>+ printf("ERROR: TestRunner::addDisallowedURL(JSStringRef) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool TestRunner::callShouldCloseOnWebView()
</span><span class="lines">@@ -108,36 +109,66 @@
</span><span class="cx"> applicationCache->deleteAllApplicationCaches();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef name)
</del><ins>+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef url)
</ins><span class="cx"> {
</span><del>- // FIXME: Implement to get disk usage by all application caches for an origin.
- return 0;
</del><ins>+ COMPtr<IWebSecurityOrigin> origin;
+ if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin, reinterpret_cast<void**>(&origin))))
+ return 0;
+
+ COMPtr<IWebApplicationCache> applicationCache;
+ if (FAILED(WebKitCreateInstance(CLSID_WebApplicationCache, 0, IID_IWebApplicationCache, reinterpret_cast<void**>(&applicationCache))))
+ return 0;
+
+ _bstr_t urlBstr(JSStringCopyBSTR(url), false);
+ origin->initWithURL(urlBstr.GetBSTR());
+
+ long long usage = 0;
+ if (FAILED(applicationCache->diskUsageForOrigin(origin.get(), &usage)))
+ return 0;
+
+ return usage;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::syncLocalStorage()
</span><span class="cx"> {
</span><del>- // FIXME: Implement.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::syncLocalStorage() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef originIdentifier)
</span><span class="cx"> {
</span><del>- // FIXME: Implement to support getting local storage disk usage for an origin.
</del><ins>+ // FIXME: Implement to support getting local storage disk usage for an origin. (Ditto WebStorageManager)
+ printf("ERROR: TestRunner::localStorageDiskUsageForOrigin(JSStringRef) not implemented\n");
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::observeStorageTrackerNotifications(unsigned number)
</span><span class="cx"> {
</span><del>- // FIXME: Implement.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::observeStorageTrackerNotifications(unsigned) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::clearApplicationCacheForOrigin(JSStringRef origin)
</span><span class="cx"> {
</span><del>- // FIXME: Implement to support deleting all application cache for an origin.
</del><ins>+ COMPtr<IWebSecurityOrigin> securityOrigin;
+ if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin, reinterpret_cast<void**>(&securityOrigin))))
+ return;
+
+ _bstr_t originBstr(JSStringCopyBSTR(origin), false);
+ if (FAILED(securityOrigin->initWithURL(originBstr.GetBSTR())))
+ return;
+
+ COMPtr<IWebApplicationCache> applicationCache;
+ if (FAILED(WebKitCreateInstance(CLSID_WebApplicationCache, 0, IID_IWebApplicationCache, reinterpret_cast<void**>(&applicationCache))))
+ return;
+
+ applicationCache->deleteCacheForOrigin(securityOrigin.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement to get origins that have application caches.
</span><ins>+ printf("ERROR: TestRunner::originsWithApplicationCache(JSContextRef) not implemented\n");
</ins><span class="cx"> return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -156,28 +187,33 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::deleteAllLocalStorage()
</span><span class="cx"> {
</span><del>- // FIXME: Implement.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::deleteAllLocalStorage() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setStorageDatabaseIdleInterval(double)
</span><span class="cx"> {
</span><del>- // FIXME: Implement this.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::setStorageDatabaseIdleInterval(double) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::closeIdleLocalStorageDatabases()
</span><span class="cx"> {
</span><del>- // FIXME: Implement this.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::closeIdleLocalStorageDatabases(double) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
</span><span class="cx"> {
</span><del>- // FIXME: Implement.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::originsWithLocalStorage(JSContextRef) not implemented\n");
</ins><span class="cx"> return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
</span><span class="cx"> {
</span><del>- // FIXME: Implement.
</del><ins>+ // FIXME: Implement. Requires non-existant (on Windows) WebStorageManager
+ printf("ERROR: TestRunner::deleteLocalStorageForOrigin(JSStringRef) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::clearBackForwardList()
</span><span class="lines">@@ -209,12 +245,14 @@
</span><span class="cx"> JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement!
</span><ins>+ printf("ERROR: TestRunner::copyDecodedHostName(JSStringRef) not implemented\n");
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement!
</span><ins>+ printf("ERROR: TestRunner::copyEncodedHostName(JSStringRef) not implemented\n");
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -230,6 +268,9 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> COMPtr<IWebHistory> sharedHistory;
</span><ins>+ if (SUCCEEDED(history->optionalSharedHistory(&sharedHistory)) && sharedHistory)
+ return;
+
</ins><span class="cx"> if (FAILED(WebKitCreateInstance(CLSID_WebHistory, 0, __uuidof(sharedHistory), reinterpret_cast<void**>(&sharedHistory))))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -239,6 +280,7 @@
</span><span class="cx"> int TestRunner::numberOfPendingGeolocationPermissionRequests()
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for Geolocation layout tests.
</span><ins>+ printf("ERROR: TestRunner::numberOfPendingGeolocationPermissionRequests() not implemented\n");
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -351,7 +393,11 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::setAppCacheMaximumSize(unsigned long long size)
</span><span class="cx"> {
</span><del>- printf("ERROR: TestRunner::setAppCacheMaximumSize() not implemented\n");
</del><ins>+ COMPtr<IWebApplicationCache> applicationCache;
+ if (FAILED(WebKitCreateInstance(CLSID_WebApplicationCache, 0, IID_IWebApplicationCache, reinterpret_cast<void**>(&applicationCache))))
+ return;
+
+ applicationCache->setMaximumSize(size);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
</span><span class="lines">@@ -377,11 +423,13 @@
</span><span class="cx"> if (FAILED(frame->webView(&webView)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (setDelegate) {
- policyDelegate->setPermissive(permissive);
- webView->setPolicyDelegate(policyDelegate);
- } else
- webView->setPolicyDelegate(0);
</del><ins>+ if (!setDelegate) {
+ webView->setPolicyDelegate(nullptr);
+ return;
+ }
+
+ policyDelegate->setPermissive(permissive);
+ webView->setPolicyDelegate(policyDelegate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setDatabaseQuota(unsigned long long quota)
</span><span class="lines">@@ -399,12 +447,25 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::goBack()
</span><span class="cx"> {
</span><del>- // FIXME: implement to enable loader/navigation-while-deferring-loads.html
</del><ins>+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ BOOL ignore = TRUE;
+ webView->goBack(&ignore);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void TestRunner::setDefersLoading(bool)
</del><ins>+void TestRunner::setDefersLoading(bool defers)
</ins><span class="cx"> {
</span><del>- // FIXME: implement to enable loader/navigation-while-deferring-loads.html
</del><ins>+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ viewPrivate->setDefersCallbacks(defers);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
</span><span class="lines">@@ -413,27 +474,29 @@
</span><span class="cx"> if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- BSTR schemeBSTR = JSStringCopyBSTR(scheme);
- webView->setDomainRelaxationForbiddenForURLScheme(forbidden, schemeBSTR);
- SysFreeString(schemeBSTR);
</del><ins>+ _bstr_t schemeBSTR(JSStringCopyBSTR(scheme), false);
+ webView->setDomainRelaxationForbiddenForURLScheme(forbidden, schemeBSTR.GetBSTR());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for DeviceOrientation layout tests.
</span><span class="cx"> // See https://bugs.webkit.org/show_bug.cgi?id=30335.
</span><ins>+ printf("ERROR: TestRunner::setMockDeviceOrientation() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for Geolocation layout tests.
</span><span class="cx"> // See https://bugs.webkit.org/show_bug.cgi?id=28264.
</span><ins>+ printf("ERROR: TestRunner::setMockGeolocationPosition() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for Geolocation layout tests.
</span><span class="cx"> // See https://bugs.webkit.org/show_bug.cgi?id=28264.
</span><ins>+ printf("ERROR: TestRunner::setMockGeolocationPositionUnavailableError() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setGeolocationPermission(bool allow)
</span><span class="lines">@@ -444,6 +507,7 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled)
</span><span class="cx"> {
</span><ins>+#if ENABLE(ICONDATABASE)
</ins><span class="cx"> // See also <rdar://problem/6480108>
</span><span class="cx"> COMPtr<IWebIconDatabase> iconDatabase;
</span><span class="cx"> COMPtr<IWebIconDatabase> tmpIconDatabase;
</span><span class="lines">@@ -453,11 +517,12 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> iconDatabase->setEnabled(iconDatabaseEnabled);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void TestRunner::setMainFrameIsFirstResponder(bool flag)
</del><ins>+void TestRunner::setMainFrameIsFirstResponder(bool)
</ins><span class="cx"> {
</span><del>- // FIXME: Implement!
</del><ins>+ // Nothing to do here on Windows
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
</span><span class="lines">@@ -493,6 +558,7 @@
</span><span class="cx"> void TestRunner::setSpatialNavigationEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for SpatialNavigation layout tests.
</span><ins>+ printf("ERROR: TestRunner::setSpatialNavigationEnabled(bool) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
</span><span class="lines">@@ -544,7 +610,15 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::setPluginsEnabled(bool flag)
</span><span class="cx"> {
</span><del>- // FIXME: Implement
</del><ins>+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ preferences->setPlugInsEnabled(flag);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setJavaScriptCanAccessClipboard(bool enabled)
</span><span class="lines">@@ -567,6 +641,7 @@
</span><span class="cx"> void TestRunner::setAutomaticLinkDetectionEnabled(bool)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement this.
</span><ins>+ printf("ERROR: TestRunner::setAutomaticLinkDetectionEnabled(bool) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setTabKeyCyclesThroughElements(bool shouldCycle)
</span><span class="lines">@@ -584,7 +659,7 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::setUseDashboardCompatibilityMode(bool flag)
</span><span class="cx"> {
</span><del>- // FIXME: Implement!
</del><ins>+ // Not implemented on Windows.
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setUserStyleSheetEnabled(bool flag)
</span><span class="lines">@@ -781,6 +856,7 @@
</span><span class="cx"> void TestRunner::dispatchPendingLoadRequests()
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement for testing fix for 6727495
</span><ins>+ printf("ERROR: TestRunner::dispatchPendingLoadRequests() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
</span><span class="lines">@@ -884,12 +960,21 @@
</span><span class="cx"> bool TestRunner::findString(JSContextRef /* context */, JSStringRef /* target */, JSObjectRef /* optionsArray */)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement
</span><ins>+ printf("ERROR: TestRunner::findString(...) not implemented\n");
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TestRunner::setCacheModel(int)
</del><ins>+void TestRunner::setCacheModel(int cacheModel)
</ins><span class="cx"> {
</span><del>- // FIXME: Implement
</del><ins>+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ preferences->setCacheModel(static_cast<WebCacheModel>(cacheModel));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool TestRunner::isCommandEnabled(JSStringRef /*name*/)
</span><span class="lines">@@ -1083,7 +1168,7 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
</span><span class="cx"> {
</span><del>-
</del><ins>+ // Nothing implemented here (compare to Mac)
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::apiTestGoToCurrentBackForwardItem()
</span><span class="lines">@@ -1104,21 +1189,33 @@
</span><span class="cx"> webView->goToBackForwardItem(item.get(), &success);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TestRunner::setWebViewEditable(bool)
</del><ins>+void TestRunner::setWebViewEditable(bool editable)
</ins><span class="cx"> {
</span><ins>+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return;
+
+ viewEditing->setEditable(editable);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::authenticateSession() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::abortModal()
</span><span class="cx"> {
</span><ins>+ // Nothing to do
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setSerializeHTTPLoads(bool)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement.
</span><ins>+ printf("ERROR: TestRunner::setSerializeHTTPLoads() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setTextDirection(JSStringRef direction)
</span><span class="lines">@@ -1132,18 +1229,22 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::addChromeInputField()
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::addChromeInputField() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::removeChromeInputField()
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::removeChromeInputField() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::focusWebView()
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::focusWebView() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setBackingScaleFactor(double)
</span><span class="cx"> {
</span><ins>+ // Not applicable
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::resetPageVisibility()
</span><span class="lines">@@ -1158,18 +1259,22 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::grantWebNotificationPermission(JSStringRef origin)
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::grantWebNotificationPermission(JSStringRef) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::denyWebNotificationPermission(JSStringRef jsOrigin)
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::denyWebNotificationPermission(JSStringRef) not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::removeAllWebNotificationPermissions()
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::removeAllWebNotificationPermissions() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::simulateWebNotificationClick(JSValueRef jsNotification)
</span><span class="cx"> {
</span><ins>+ printf("ERROR: TestRunner::simulateWebNotificationClick() not implemented\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::simulateLegacyWebNotificationClick(JSStringRef title)
</span></span></pre>
</div>
</div>
</body>
</html>