<!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>[191214] trunk/Tools</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/191214">191214</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-10-16 15:09:57 -0700 (Fri, 16 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebKit2.AutoLayoutIntegration API test is failing on some of the bots
https://bugs.webkit.org/show_bug.cgi?id=150255

Reviewed by Simon Fraser.

* Scripts/run-api-tests:
(runTest):
* TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:]):
(-[AutoLayoutWKWebView layoutAtMinimumWidth:andExpectContentSizeChange:]):
(-[AutoLayoutWKWebView load:expectingContentSize:]): Deleted.
(-[AutoLayoutWKWebView expectContentSizeChange:]): Deleted.
Don't set the layout size until after the load finishes and we're waiting
for the reply, so that there is no race between the new size coming in
and us waiting for it.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsrunapitests">trunk/Tools/Scripts/run-api-tests</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaAutoLayoutIntegrationmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (191213 => 191214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-10-16 21:58:58 UTC (rev 191213)
+++ trunk/Tools/ChangeLog        2015-10-16 22:09:57 UTC (rev 191214)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-10-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        WebKit2.AutoLayoutIntegration API test is failing on some of the bots
+        https://bugs.webkit.org/show_bug.cgi?id=150255
+
+        Reviewed by Simon Fraser.
+
+        * Scripts/run-api-tests:
+        (runTest):
+        * TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
+        (-[AutoLayoutWKWebView load:withWidth:expectingContentSize:]):
+        (-[AutoLayoutWKWebView layoutAtMinimumWidth:andExpectContentSizeChange:]):
+        (-[AutoLayoutWKWebView load:expectingContentSize:]): Deleted.
+        (-[AutoLayoutWKWebView expectContentSizeChange:]): Deleted.
+        Don't set the layout size until after the load finishes and we're waiting
+        for the reply, so that there is no race between the new size coming in
+        and us waiting for it.
+
</ins><span class="cx"> 2015-10-16  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WebEditingDelegate should be a formal protocol
</span></span></pre></div>
<a id="trunkToolsScriptsrunapitests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-api-tests (191213 => 191214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-api-tests        2015-10-16 21:58:58 UTC (rev 191213)
+++ trunk/Tools/Scripts/run-api-tests        2015-10-16 22:09:57 UTC (rev 191214)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx"> my $verbose = 0;
</span><span class="cx"> my $showLeaks = 0;
</span><span class="cx"> my $dumpTests = 0;
</span><ins>+my $disableTimeout = 0;
</ins><span class="cx"> my $build = 1;
</span><span class="cx"> my $root;
</span><span class="cx"> my $buildDefault = $build ? &quot;build&quot; : &quot;do not build&quot;;
</span><span class="lines">@@ -68,6 +69,7 @@
</span><span class="cx">   --[no-]build          Build (or do not build) unit tests prior to running (default: $buildDefault)
</span><span class="cx">   --root=               Path to the pre-built root containing TestWebKitAPI
</span><span class="cx">   --show-leaks          Show leaks in the output
</span><ins>+  --no-timeout          Disable test timeouts
</ins><span class="cx"> 
</span><span class="cx"> Platform options:
</span><span class="cx">   --ios-simulator       Run tests in the iOS Simulator
</span><span class="lines">@@ -88,6 +90,7 @@
</span><span class="cx">     'help' =&gt; \$showHelp,
</span><span class="cx">     'verbose|v' =&gt; \$verbose,
</span><span class="cx">     'show-leaks' =&gt; \$showLeaks,
</span><ins>+    'no-timeout' =&gt; \$disableTimeout,
</ins><span class="cx">     'dump|d' =&gt; \$dumpTests,
</span><span class="cx">     'build!' =&gt; \$build,
</span><span class="cx">     'root=s' =&gt; \$root
</span><span class="lines">@@ -203,10 +206,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         eval {
</span><del>-            local $SIG{ALRM} = sub { die &quot;alarm\n&quot; };
-            alarm $timeout;
-            waitpid($pid, 0);
-            alarm 0;
</del><ins>+            if ($disableTimeout) {
+                waitpid($pid, 0);    
+            } else {
+                local $SIG{ALRM} = sub { die &quot;alarm\n&quot; };
+                alarm $timeout;
+                waitpid($pid, 0);
+                alarm 0;
+            }
</ins><span class="cx">             $result = $?;
</span><span class="cx">         };
</span><span class="cx">         if ($@) {
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaAutoLayoutIntegrationmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm (191213 => 191214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm        2015-10-16 21:58:58 UTC (rev 191213)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm        2015-10-16 22:09:57 UTC (rev 191214)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     NSSize _expectedIntrinsicContentSize;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)load:(NSString *)HTMLString expectingContentSize:(NSSize)size
</del><ins>+- (void)load:(NSString *)HTMLString withWidth:(CGFloat)width expectingContentSize:(NSSize)size
</ins><span class="cx"> {
</span><span class="cx">     EXPECT_FALSE(_expectingIntrinsicContentSizeChange);
</span><span class="cx"> 
</span><span class="lines">@@ -71,11 +71,13 @@
</span><span class="cx">     [self loadHTMLString:[baseHTML stringByAppendingString:HTMLString] baseURL:nil];
</span><span class="cx">     TestWebKitAPI::Util::run(&amp;didFinishNavigation);
</span><span class="cx"> 
</span><del>-    [self expectContentSizeChange:size];
</del><ins>+    [self layoutAtMinimumWidth:width andExpectContentSizeChange:size];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)expectContentSizeChange:(NSSize)size
</del><ins>+- (void)layoutAtMinimumWidth:(CGFloat)width andExpectContentSizeChange:(NSSize)size
</ins><span class="cx"> {
</span><ins>+    [self _setMinimumLayoutWidth:width];
+
</ins><span class="cx">     // NOTE: Each adjacent expected result must be different, or we'll early return and not call invalidateIntrinsicContentSize!
</span><span class="cx">     EXPECT_FALSE(NSEqualSizes(size, self.intrinsicContentSize));
</span><span class="cx"> 
</span><span class="lines">@@ -83,6 +85,8 @@
</span><span class="cx">     _expectedIntrinsicContentSize = size;
</span><span class="cx">     didInvalidateIntrinsicContentSize = false;
</span><span class="cx">     TestWebKitAPI::Util::run(&amp;didInvalidateIntrinsicContentSize);
</span><ins>+
+    [self _setMinimumLayoutWidth:0];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)invalidateIntrinsicContentSize
</span><span class="lines">@@ -104,34 +108,30 @@
</span><span class="cx"> TEST(WebKit2, AutoLayoutIntegration)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;AutoLayoutWKWebView&gt; webView = adoptNS([[AutoLayoutWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 1000, 1000)]);
</span><del>-    [webView _setMinimumLayoutWidth:50];
</del><span class="cx"> 
</span><span class="cx">     AutoLayoutNavigationDelegate *delegate = [[AutoLayoutNavigationDelegate alloc] init];
</span><span class="cx">     [webView setNavigationDelegate:delegate];
</span><span class="cx"> 
</span><span class="cx">     // 10x10 rect with the constraint (width &gt;= 50) -&gt; 50x10
</span><del>-    [webView load:@&quot;&lt;div class='small'&gt;&lt;/div&gt;&quot; expectingContentSize:NSMakeSize(50, 10)];
</del><ins>+    [webView load:@&quot;&lt;div class='small'&gt;&lt;/div&gt;&quot; withWidth:50 expectingContentSize:NSMakeSize(50, 10)];
</ins><span class="cx"> 
</span><span class="cx">     // 100x100 rect with the constraint (width &gt;= 50) -&gt; 100x100
</span><del>-    [webView load:@&quot;&lt;div class='large'&gt;&lt;/div&gt;&quot; expectingContentSize:NSMakeSize(100, 100)];
</del><ins>+    [webView load:@&quot;&lt;div class='large'&gt;&lt;/div&gt;&quot; withWidth:50 expectingContentSize:NSMakeSize(100, 100)];
</ins><span class="cx"> 
</span><span class="cx">     // 100x10 rect with the constraint (width &gt;= 50) -&gt; 100x10
</span><del>-    [webView load:@&quot;&lt;div class='veryWide'&gt;&lt;/div&gt;&quot; expectingContentSize:NSMakeSize(100, 10)];
</del><ins>+    [webView load:@&quot;&lt;div class='veryWide'&gt;&lt;/div&gt;&quot; withWidth:50 expectingContentSize:NSMakeSize(100, 10)];
</ins><span class="cx"> 
</span><span class="cx">     // Ten 10x10 rects, inline, should result in two rows of five; with the constraint (width &gt;= 50) -&gt; 50x20
</span><del>-    [webView load:@&quot;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&quot; expectingContentSize:NSMakeSize(50, 20)];
</del><ins>+    [webView load:@&quot;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&quot; withWidth:50 expectingContentSize:NSMakeSize(50, 20)];
</ins><span class="cx"> 
</span><span class="cx">     // Changing the width to 10 should result in ten rows of one; with the constraint (width &gt;= 10) -&gt; 10x100
</span><del>-    [webView _setMinimumLayoutWidth:10];
-    [webView expectContentSizeChange:NSMakeSize(10, 100)];
</del><ins>+    [webView layoutAtMinimumWidth:10 andExpectContentSizeChange:NSMakeSize(10, 100)];
</ins><span class="cx"> 
</span><span class="cx">     // Changing the width to 100 should result in one rows of ten; with the constraint (width &gt;= 100) -&gt; 100x10
</span><del>-    [webView _setMinimumLayoutWidth:100];
-    [webView expectContentSizeChange:NSMakeSize(100, 10)];
</del><ins>+    [webView layoutAtMinimumWidth:100 andExpectContentSizeChange:NSMakeSize(100, 10)];
</ins><span class="cx"> 
</span><span class="cx">     // One 100x100 rect and ten 10x10 rects, inline; with the constraint (width &gt;= 20) -&gt; 100x110
</span><del>-    [webView _setMinimumLayoutWidth:20];
-    [webView load:@&quot;&lt;div class='large'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&quot; expectingContentSize:NSMakeSize(100, 110)];
</del><ins>+    [webView load:@&quot;&lt;div class='large'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&lt;div class='small inline'&gt;&lt;/div&gt;&quot; withWidth:20 expectingContentSize:NSMakeSize(100, 110)];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>