<!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>[198501] 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/198501">198501</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2016-03-21 15:22:16 -0700 (Mon, 21 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>
Source/WebKit/win:
[Win] Connect layoutTestController.findString() to support testing 
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee &lt;hyungwook.lee@navercorp.com&gt; on 2016-03-21
Reviewed by Alex Christensen.

Implement WebView::findString to support testing efforts.

* Interfaces/IWebViewPrivate.idl: Add API declaration.
* WebView.cpp:
* WebView.h:

Tools:
[Win] Connect layoutTestController.findString() to support testing
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee &lt;hyungwook.lee@navercorp.com&gt; on 2016-03-21
Reviewed by Alex Christensen.

Implement TestRunner::findString().

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::findString):

LayoutTests:
[Win] Connect layoutTestController.findString() to support testing
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee &lt;hyungwook.lee@navercorp.com&gt; on 2016-03-21
Reviewed by Alex Christensen.

* platform/win/TestExpectations: Unskip test.
* platform/win/editing/text-iterator/findString-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesIWebViewPrivateidl">trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewh">trunk/Source/WebKit/win/WebView.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/win/editing/text-iterator/</li>
<li><a href="#trunkLayoutTestsplatformwineditingtextiteratorfindStringexpectedtxt">trunk/LayoutTests/platform/win/editing/text-iterator/findString-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/LayoutTests/ChangeLog        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-03-21  Hyungwook Lee  &lt;hyungwook.lee@navercorp.com&gt;
+
+        [Win] Connect layoutTestController.findString() to support testing
+        https://bugs.webkit.org/show_bug.cgi?id=50234
+
+        Reviewed by Alex Christensen.
+
+        * platform/win/TestExpectations: Unskip test.
+        * platform/win/editing/text-iterator/findString-expected.txt: Added.
+
</ins><span class="cx"> 2016-03-21  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector search icon does not fit when zoomed in.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/LayoutTests/platform/win/TestExpectations        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1255,8 +1255,7 @@
</span><span class="cx"> ###### Text Iterator
</span><span class="cx"> # Plain text controller currently in Mac DumpRenderTree only.
</span><span class="cx"> editing/text-iterator [ Skip ]
</span><del>-# TODO Missing testRunner.findString()
-webkit.org/b/50234 editing/text-iterator/findString.html [ Skip ]
</del><ins>+editing/text-iterator/findString.html [ Pass ]
</ins><span class="cx"> 
</span><span class="cx"> ###### TODO Spellchecker is not implemented. Skip these test.
</span><span class="cx"> webkit.org/b/66620 editing/spelling/spelling-insert-html.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwineditingtextiteratorfindStringexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/win/editing/text-iterator/findString-expected.txt (0 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/editing/text-iterator/findString-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/win/editing/text-iterator/findString-expected.txt        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -0,0 +1,176 @@
</span><ins>+Searching for ‘o’ in ‘Lorem ipsum dolor sit amet’ with options []:
+PASS: Got a match at 1,2 as expected.
+PASS: Got a match at 13,14 as expected.
+PASS: Got a match at 15,16 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘o’ in ‘Lorem ipsum dolor sit amet’ with options [WrapAround]:
+PASS: Got a match at 1,2 as expected.
+PASS: Got a match at 13,14 as expected.
+PASS: Got a match at 15,16 as expected.
+PASS: Got a match at 1,2 as expected.
+
+Searching for ‘o’ in ‘Lorem ipsum dolor sit amet’ with options [Backwards]:
+PASS: Got a match at 15,16 as expected.
+PASS: Got a match at 13,14 as expected.
+PASS: Got a match at 1,2 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘o’ in ‘Lorem ipsum dolor sit amet’ with options [Backwards, WrapAround]:
+PASS: Got a match at 15,16 as expected.
+PASS: Got a match at 13,14 as expected.
+PASS: Got a match at 1,2 as expected.
+PASS: Got a match at 15,16 as expected.
+
+Searching for ‘O’ in ‘Lorem ipsum dolor sit amet’ with options []:
+PASS: Got no match as expected.
+
+Searching for ‘O’ in ‘Lorem ipsum dolor sit amet’ with options [CaseInsensitive]:
+PASS: Got a match at 1,2 as expected.
+PASS: Got a match at 13,14 as expected.
+PASS: Got a match at 15,16 as expected.
+
+Searching for ‘mount’ in ‘insurmountable mountain’ with options []:
+PASS: Got a match at 5,10 as expected.
+PASS: Got a match at 15,20 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘mount’ in ‘insurmountable mountain’ with options [AtWordStarts]:
+PASS: Got a match at 15,20 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘co’ in ‘cocoa’ with options []:
+PASS: Got a match at 0,2 as expected.
+PASS: Got a match at 2,4 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘co’ in ‘cocoa’ with options [AtWordStarts]:
+PASS: Got a match at 0,2 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘org’ in ‘webkit.org’ with options [AtWordStarts]:
+FAIL: Expected a match at  but got a match at 7,10 instead.
+
+Searching for ‘.org’ in ‘webkit.org’ with options [AtWordStarts]:
+PASS: Got a match at 6,10 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘rg’ in ‘webkit.org’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘org’ in ‘webkit.org’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got a match at 7,10 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘.org’ in ‘webkit.org’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got a match at 6,10 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘t.org’ in ‘webkit.org’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘it’ in ‘WebKit’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘Kit’ in ‘WebKit’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got a match at 3,6 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘bKit’ in ‘WebKit’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘equest’ in ‘XMLHTTPRequest’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘Request’ in ‘XMLHTTPRequest’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got a match at 7,14 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘PRequest’ in ‘XMLHTTPRequest’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘64’ in ‘LP64’ with options [AtWordStarts]:
+PASS: Got no match as expected.
+
+Searching for ‘4’ in ‘LP64’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘64’ in ‘LP64’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got a match at 2,4 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘P64’ in ‘LP64’ with options [AtWordStarts, TreatMedialCapitalAsWordStart]:
+PASS: Got no match as expected.
+
+Searching for ‘動戦士’ in ‘起動戦士’ with options [AtWordStarts]:
+PASS: Got a match at 1,4 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘戦士’ in ‘起動戦士’ with options [AtWordStarts]:
+PASS: Got a match at 2,4 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘士’ in ‘起動戦士’ with options [AtWordStarts]:
+PASS: Got a match at 3,4 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘a’ in long string with options [AtWordStarts]:
+PASS: Got a match at 6146,6147 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กร’ in ‘กรปูเลกชกชกรกรกชบงกช’ with options []:
+PASS: Got a match at 0,2 as expected.
+PASS: Got a match at 10,12 as expected.
+PASS: Got a match at 12,14 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กร’ in ‘กรปูเลกชกชกรกรกชบงกช’ with options [AtWordStarts]:
+PASS: Got a match at 0,2 as expected.
+PASS: Got a match at 12,14 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กช’ in ‘กรปูเลกชกชกรกรกชบงกช’ with options []:
+PASS: Got a match at 6,8 as expected.
+PASS: Got a match at 8,10 as expected.
+PASS: Got a match at 14,16 as expected.
+PASS: Got a match at 18,20 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กช’ in ‘กรปูเลกชกชกรกรกชบงกช’ with options [AtWordStarts]:
+PASS: Got a match at 6,8 as expected.
+PASS: Got a match at 8,10 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กร’ in long string with options []:
+PASS: Got a match at 6144,6146 as expected.
+PASS: Got a match at 6154,6156 as expected.
+PASS: Got a match at 6156,6158 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กร’ in long string with options [AtWordStarts]:
+PASS: Got a match at 6156,6158 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กร’ in long string with options [AtWordStarts]:
+PASS: Got a match at 6144,6146 as expected.
+PASS: Got a match at 6156,6158 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘กช’ in long string with options [AtWordStarts]:
+PASS: Got no match as expected.
+
+Searching for ‘ ’ in ‘Spaces, the final frontier’ with options [AtWordStarts]:
+PASS: Got a match at 7,8 as expected.
+PASS: Got a match at 11,12 as expected.
+PASS: Got a match at 17,18 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘@’ in ‘Use an @import rule’ with options [AtWordStarts]:
+PASS: Got a match at 7,8 as expected.
+PASS: Got no match as expected.
+
+Searching for ‘(x’ in ‘If ((x + 5) * 2) = 14, then x = 2’ with options [AtWordStarts]:
+PASS: Got a match at 4,6 as expected.
+PASS: Got no match as expected.
+
+
</ins></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Source/WebKit/win/ChangeLog        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-03-21  Hyungwook Lee  &lt;hyungwook.lee@navercorp.com&gt; 
+
+        [Win] Connect layoutTestController.findString() to support testing 
+        https://bugs.webkit.org/show_bug.cgi?id=50234
+
+        Reviewed by Alex Christensen.
+
+        Implement WebView::findString to support testing efforts.
+
+        * Interfaces/IWebViewPrivate.idl: Add API declaration.
+        * WebView.cpp:
+        * WebView.h:
+
</ins><span class="cx"> 2016-03-16  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r196951 and r197031.
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesIWebViewPrivateidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008, 2015 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2016 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">@@ -321,8 +321,18 @@
</span><span class="cx">         [in] WebUserContentInjectedFrames injectedFrames);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+typedef enum {
+    WebFindOptionsCaseInsensitive = 1 &lt;&lt; 0,
+    WebFindOptionsAtWordStarts = 1 &lt;&lt; 1,
+    WebFindOptionsTreatMedialCapitalAsWordStart = 1 &lt;&lt; 2,
+    WebFindOptionsBackwards = 1 &lt;&lt; 3,
+    WebFindOptionsWrapAround = 1 &lt;&lt; 4,
+    WebFindOptionsStartInSelection = 1 &lt;&lt; 5
+} WebFindOptions;
+
</ins><span class="cx"> [ uuid(08C88359-76AA-48F2-BA27-820540E781E9) ]
</span><span class="cx"> interface IWebViewPrivate3 : IWebViewPrivate2
</span><span class="cx"> {
</span><span class="cx">     HRESULT layerTreeAsString([out] BSTR*);
</span><ins>+    HRESULT findString([in] BSTR, [in] WebFindOptions, [out] BOOL* found); 
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Source/WebKit/win/WebView.cpp        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006-2015 Apple, Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2016 Apple, Inc.  All rights reserved.
</ins><span class="cx">  * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved.
</span><span class="cx">  * Copyright (C) 2011 Brent Fulgham. All rights reserved.
</span><span class="cx">  *
</span><span class="lines">@@ -7564,3 +7564,13 @@
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><ins>+
+HRESULT WebView::findString(_In_ BSTR string, WebFindOptions options, _Deref_opt_out_ BOOL* found)
+{
+    if (!found)
+        return E_POINTER;
+
+    *found = m_page-&gt;findString(toString(string), options);
+    return S_OK;
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebKitwinWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.h (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.h        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Source/WebKit/win/WebView.h        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006-2012, 2014-2015 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2016 Apple Inc.  All rights reserved.
</ins><span class="cx">  * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved.
</span><span class="cx">  * Copyright (C) 2011 Brent Fulgham. All rights reserved.
</span><span class="cx">  *
</span><span class="lines">@@ -390,6 +390,7 @@
</span><span class="cx"> 
</span><span class="cx">     // IWebViewPrivate3
</span><span class="cx">     HRESULT STDMETHODCALLTYPE layerTreeAsString(_Deref_opt_out_ BSTR*);
</span><ins>+    HRESULT STDMETHODCALLTYPE findString(_In_ BSTR, WebFindOptions, _Deref_opt_out_ BOOL*);
</ins><span class="cx"> 
</span><span class="cx">     // WebView
</span><span class="cx">     bool shouldUseEmbeddedView(const WTF::String&amp; mimeType) const;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Tools/ChangeLog        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-21  Hyungwook Lee  &lt;hyungwook.lee@navercorp.com&gt;
+
+        [Win] Connect layoutTestController.findString() to support testing
+        https://bugs.webkit.org/show_bug.cgi?id=50234
+
+        Reviewed by Alex Christensen.
+
+        Implement TestRunner::findString().
+
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        (TestRunner::findString):
+
</ins><span class="cx"> 2016-03-20  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (198500 => 198501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2016-03-21 22:07:33 UTC (rev 198500)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2016-03-21 22:22:16 UTC (rev 198501)
</span><span class="lines">@@ -928,11 +928,52 @@
</span><span class="cx">     viewPrivate-&gt;executeCoreCommandByName(nameBSTR, valueBSTR);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool TestRunner::findString(JSContextRef /* context */, JSStringRef /* target */, JSObjectRef /* optionsArray */)
</del><ins>+bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
</ins><span class="cx"> {
</span><del>-    // FIXME: Implement
-    printf(&quot;ERROR: TestRunner::findString(...) not implemented\n&quot;);
-    return false;
</del><ins>+    COMPtr&lt;IWebView&gt; webView;
+    if (FAILED(frame-&gt;webView(&amp;webView)))
+        return false;
+
+    COMPtr&lt;IWebViewPrivate3&gt; viewPrivate;
+    if (FAILED(webView-&gt;QueryInterface(&amp;viewPrivate)))
+        return false;
+
+    unsigned char options = 0;
+
+    JSRetainPtr&lt;JSStringRef&gt; lengthPropertyName(Adopt, JSStringCreateWithUTF8CString(&quot;length&quot;));
+    JSValueRef lengthValue = JSObjectGetProperty(context, optionsArray, lengthPropertyName.get(), nullptr);
+    if (!JSValueIsNumber(context, lengthValue))
+        return false;
+
+    _bstr_t targetBSTR(JSStringCopyBSTR(target), false);
+
+    size_t length = static_cast&lt;size_t&gt;(JSValueToNumber(context, lengthValue, nullptr));
+    for (size_t i = 0; i &lt; length; ++i) {
+        JSValueRef value = JSObjectGetPropertyAtIndex(context, optionsArray, i, nullptr);
+        if (!JSValueIsString(context, value))
+            continue;
+
+        JSRetainPtr&lt;JSStringRef&gt; optionName(Adopt, JSValueToStringCopy(context, value, nullptr));
+
+        if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;CaseInsensitive&quot;))
+            options |= WebFindOptionsCaseInsensitive;
+        else if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;AtWordStarts&quot;))
+            options |= WebFindOptionsAtWordStarts;
+        else if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;TreatMedialCapitalAsWordStart&quot;))
+            options |= WebFindOptionsTreatMedialCapitalAsWordStart;
+        else if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;Backwards&quot;))
+            options |= WebFindOptionsBackwards;
+        else if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;WrapAround&quot;))
+            options |= WebFindOptionsWrapAround;
+        else if (JSStringIsEqualToUTF8CString(optionName.get(), &quot;StartInSelection&quot;))
+            options |= WebFindOptionsStartInSelection;
+    }
+
+    BOOL found = FALSE;
+    if (FAILED(viewPrivate-&gt;findString(targetBSTR, static_cast&lt;WebFindOptions&gt;(options), &amp;found)))
+        return false;
+
+    return found;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setCacheModel(int cacheModel)
</span></span></pre>
</div>
</div>

</body>
</html>