<!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>[201680] 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/201680">201680</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-04 11:58:08 -0700 (Sat, 04 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add better basic isNaN test coverage
https://bugs.webkit.org/show_bug.cgi?id=158379

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-06-04
Reviewed by Benjamin Poulain.

* js/Number-isNaN-expected.txt: Added.
* js/Number-isNaN.html: Added.
* js/global-isNaN-expected.txt: Added.
* js/global-isNaN.html: Added.
* js/script-tests/Number-isNaN.js: Added.
(objectWithNumberValueOf.valueOf):
(objectWithNaNValueOf.valueOf):
(objectRecordConversionCalls.toString):
(objectRecordConversionCalls.valueOf):
* js/script-tests/global-isNaN.js: Added.
(objectConvertToString.toString):
(objectRecordToStringCall.toString):
(objectThrowOnToString.toString):
(objectWithValueOf.valueOf):
(objectThrowOnValueOf.valueOf):
(objectThrowOnValueOf.toString):
(objectRecordValueOfCall.valueOf):
(objectRecordConversionCalls.toString):
(objectRecordConversionCalls.valueOf):
* js/script-tests/math-clz32.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsmathclz32js">trunk/LayoutTests/js/script-tests/math-clz32.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressmathclz32basicsjs">trunk/Source/JavaScriptCore/tests/stress/math-clz32-basics.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsNumberisNaNexpectedtxt">trunk/LayoutTests/js/Number-isNaN-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsNumberisNaNhtml">trunk/LayoutTests/js/Number-isNaN.html</a></li>
<li><a href="#trunkLayoutTestsjsglobalisNaNexpectedtxt">trunk/LayoutTests/js/global-isNaN-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsglobalisNaNhtml">trunk/LayoutTests/js/global-isNaN.html</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsNumberisNaNjs">trunk/LayoutTests/js/script-tests/Number-isNaN.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsglobalisNaNjs">trunk/LayoutTests/js/script-tests/global-isNaN.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201679 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-04 07:20:17 UTC (rev 201679)
+++ trunk/LayoutTests/ChangeLog        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-06-04  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Add better basic isNaN test coverage
+        https://bugs.webkit.org/show_bug.cgi?id=158379
+
+        Reviewed by Benjamin Poulain.
+
+        * js/Number-isNaN-expected.txt: Added.
+        * js/Number-isNaN.html: Added.
+        * js/global-isNaN-expected.txt: Added.
+        * js/global-isNaN.html: Added.
+        * js/script-tests/Number-isNaN.js: Added.
+        (objectWithNumberValueOf.valueOf):
+        (objectWithNaNValueOf.valueOf):
+        (objectRecordConversionCalls.toString):
+        (objectRecordConversionCalls.valueOf):
+        * js/script-tests/global-isNaN.js: Added.
+        (objectConvertToString.toString):
+        (objectRecordToStringCall.toString):
+        (objectThrowOnToString.toString):
+        (objectWithValueOf.valueOf):
+        (objectThrowOnValueOf.valueOf):
+        (objectThrowOnValueOf.toString):
+        (objectRecordValueOfCall.valueOf):
+        (objectRecordConversionCalls.toString):
+        (objectRecordConversionCalls.valueOf):
+        * js/script-tests/math-clz32.js:
+
</ins><span class="cx"> 2016-06-04  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSP: Content Security Policy directive, upgrade-insecure-requests (UIR)
</span></span></pre></div>
<a id="trunkLayoutTestsjsNumberisNaNexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/Number-isNaN-expected.txt (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/Number-isNaN-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/Number-isNaN-expected.txt        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+Test the basic behaviors of Number.isNaN()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS Number.hasOwnProperty(&quot;isNaN&quot;) is true
+PASS typeof Number.isNaN is &quot;function&quot;
+PASS Number.isNaN !== isNaN is true
+PASS Number.isNaN.length is 1
+PASS Number.isNaN.name is &quot;isNaN&quot;
+PASS Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).configurable is true
+PASS Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).writable is true
+PASS Number.isNaN() is false
+PASS Number.isNaN(NaN) is true
+PASS Number.isNaN(undefined) is false
+PASS Number.isNaN(0) is false
+PASS Number.isNaN(-0) is false
+PASS Number.isNaN(1) is false
+PASS Number.isNaN(-1) is false
+PASS Number.isNaN(42) is false
+PASS Number.isNaN(123.5) is false
+PASS Number.isNaN(-123.5) is false
+PASS Number.isNaN(Number.MAX_VALUE) is false
+PASS Number.isNaN(Number.MIN_VALUE) is false
+PASS Number.isNaN(Number.MAX_SAFE_INTEGER) is false
+PASS Number.isNaN(Number.MIN_SAFE_INTEGER) is false
+PASS Number.isNaN(Math.PI) is false
+PASS Number.isNaN(Math.E) is false
+PASS Number.isNaN(Infinity) is false
+PASS Number.isNaN(-Infinity) is false
+PASS Number.isNaN(null) is false
+PASS Number.isNaN({}) is false
+PASS Number.isNaN({ webkit: &quot;awesome&quot; }) is false
+PASS Number.isNaN([]) is false
+PASS Number.isNaN([123]) is false
+PASS Number.isNaN([1,1]) is false
+PASS Number.isNaN([NaN]) is false
+PASS Number.isNaN(&quot;&quot;) is false
+PASS Number.isNaN(&quot;1&quot;) is false
+PASS Number.isNaN(&quot;x&quot;) is false
+PASS Number.isNaN(&quot;NaN&quot;) is false
+PASS Number.isNaN(&quot;Infinity&quot;) is false
+PASS Number.isNaN(true) is false
+PASS Number.isNaN(false) is false
+PASS Number.isNaN(function(){}) is false
+PASS Number.isNaN(isNaN) is false
+PASS Number.isNaN(Symbol()) is false
+PASS Number.isNaN(objectWithNumberValueOf) is false
+PASS Number.isNaN(objectWithNaNValueOf) is false
+PASS Number.isNaN(objectRecordConversionCalls) is false
+PASS objectRecordConversionCalls.callList.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsNumberisNaNhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/Number-isNaN.html (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/Number-isNaN.html                                (rev 0)
+++ trunk/LayoutTests/js/Number-isNaN.html        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;script-tests/Number-isNaN.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsglobalisNaNexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/global-isNaN-expected.txt (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/global-isNaN-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/global-isNaN-expected.txt        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+Test the basic behaviors of global isNaN()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS globalObject.hasOwnProperty(&quot;isNaN&quot;) is true
+PASS typeof isNaN is &quot;function&quot;
+PASS isNaN.length is 1
+PASS isNaN.name is &quot;isNaN&quot;
+PASS Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).configurable is true
+PASS Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).writable is true
+PASS isNaN() is true
+PASS isNaN(NaN) is true
+PASS isNaN(undefined) is true
+PASS isNaN(0) is false
+PASS isNaN(-0) is false
+PASS isNaN(1) is false
+PASS isNaN(-1) is false
+PASS isNaN(42) is false
+PASS isNaN(123.5) is false
+PASS isNaN(-123.5) is false
+PASS isNaN(Number.MAX_VALUE) is false
+PASS isNaN(Number.MIN_VALUE) is false
+PASS isNaN(Number.MAX_SAFE_INTEGER) is false
+PASS isNaN(Number.MIN_SAFE_INTEGER) is false
+PASS isNaN(Math.PI) is false
+PASS isNaN(Math.E) is false
+PASS isNaN(Infinity) is false
+PASS isNaN(-Infinity) is false
+PASS isNaN(null) is false
+PASS isNaN({}) is true
+PASS isNaN({ webkit: &quot;awesome&quot; }) is true
+PASS isNaN([]) is false
+PASS isNaN([123]) is false
+PASS isNaN([1,1]) is true
+PASS isNaN([NaN]) is true
+PASS isNaN(&quot;&quot;) is false
+PASS isNaN(&quot;1&quot;) is false
+PASS isNaN(&quot;x&quot;) is true
+PASS isNaN(&quot;NaN&quot;) is true
+PASS isNaN(&quot;Infinity&quot;) is false
+PASS isNaN(true) is false
+PASS isNaN(false) is false
+PASS isNaN(function(){}) is true
+PASS isNaN(isNaN) is true
+PASS isNaN(Symbol()) threw exception TypeError: Cannot convert a symbol to a number.
+PASS isNaN(objectConvertToString) is false
+PASS isNaN(objectRecordToStringCall) is false
+PASS objectRecordToStringCall.toStringCallCount is 1
+PASS isNaN(objectThrowOnToString) threw exception No!.
+PASS isNaN(objectWithValueOf) is false
+PASS isNaN(objectThrowOnValueOf) threw exception Nope!.
+PASS isNaN(objectRecordValueOfCall) is true
+PASS objectRecordValueOfCall.valueOfCallCount is 1
+PASS isNaN(objectRecordConversionCalls) is false
+PASS objectRecordConversionCalls.callList.toString() is &quot;valueOf&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsglobalisNaNhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/global-isNaN.html (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/global-isNaN.html                                (rev 0)
+++ trunk/LayoutTests/js/global-isNaN.html        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;script-tests/global-isNaN.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsNumberisNaNjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/Number-isNaN.js (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/Number-isNaN.js                                (rev 0)
+++ trunk/LayoutTests/js/script-tests/Number-isNaN.js        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+description(&quot;Test the basic behaviors of Number.isNaN()&quot;);
+
+shouldBeTrue('Number.hasOwnProperty(&quot;isNaN&quot;)');
+shouldBeEqualToString('typeof Number.isNaN', 'function');
+shouldBeTrue('Number.isNaN !== isNaN');
+
+// Function properties.
+shouldBe('Number.isNaN.length', '1');
+shouldBeEqualToString('Number.isNaN.name', 'isNaN');
+shouldBe('Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).configurable', 'true');
+shouldBe('Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).enumerable', 'false');
+shouldBe('Object.getOwnPropertyDescriptor(Number, &quot;isNaN&quot;).writable', 'true');
+
+// Some simple cases.
+shouldBeFalse('Number.isNaN()');
+shouldBeTrue('Number.isNaN(NaN)');
+shouldBeFalse('Number.isNaN(undefined)');
+
+shouldBeFalse('Number.isNaN(0)');
+shouldBeFalse('Number.isNaN(-0)');
+shouldBeFalse('Number.isNaN(1)');
+shouldBeFalse('Number.isNaN(-1)');
+shouldBeFalse('Number.isNaN(42)');
+shouldBeFalse('Number.isNaN(123.5)');
+shouldBeFalse('Number.isNaN(-123.5)');
+
+shouldBeFalse('Number.isNaN(Number.MAX_VALUE)');
+shouldBeFalse('Number.isNaN(Number.MIN_VALUE)');
+shouldBeFalse('Number.isNaN(Number.MAX_SAFE_INTEGER)');
+shouldBeFalse('Number.isNaN(Number.MIN_SAFE_INTEGER)');
+shouldBeFalse('Number.isNaN(Math.PI)');
+shouldBeFalse('Number.isNaN(Math.E)');
+shouldBeFalse('Number.isNaN(Infinity)');
+shouldBeFalse('Number.isNaN(-Infinity)');
+shouldBeFalse('Number.isNaN(null)');
+
+// Non-numeric.
+shouldBeFalse('Number.isNaN({})');
+shouldBeFalse('Number.isNaN({ webkit: &quot;awesome&quot; })');
+shouldBeFalse('Number.isNaN([])');
+shouldBeFalse('Number.isNaN([123])');
+shouldBeFalse('Number.isNaN([1,1])');
+shouldBeFalse('Number.isNaN([NaN])');
+shouldBeFalse('Number.isNaN(&quot;&quot;)');
+shouldBeFalse('Number.isNaN(&quot;1&quot;)');
+shouldBeFalse('Number.isNaN(&quot;x&quot;)');
+shouldBeFalse('Number.isNaN(&quot;NaN&quot;)');
+shouldBeFalse('Number.isNaN(&quot;Infinity&quot;)');
+shouldBeFalse('Number.isNaN(true)');
+shouldBeFalse('Number.isNaN(false)');
+shouldBeFalse('Number.isNaN(function(){})');
+shouldBeFalse('Number.isNaN(isNaN)');
+shouldBeFalse('Number.isNaN(Symbol())');
+
+// Type conversion, doesn't happen.
+var objectWithNumberValueOf = { valueOf: function() { return 123; } };
+var objectWithNaNValueOf = { valueOf: function() { return NaN; } };
+shouldBeFalse('Number.isNaN(objectWithNumberValueOf)');
+shouldBeFalse('Number.isNaN(objectWithNaNValueOf)');
+
+var objectRecordConversionCalls = {
+    callList: [],
+    toString: function() {
+        this.callList.push(&quot;toString&quot;);
+        return &quot;Bad&quot;;
+    },
+    valueOf: function() {
+        this.callList.push(&quot;valueOf&quot;);
+        return 12345;
+    }
+};
+shouldBeFalse('Number.isNaN(objectRecordConversionCalls)');
+shouldBe('objectRecordConversionCalls.callList.length', '0');
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsglobalisNaNjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/global-isNaN.js (0 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/global-isNaN.js                                (rev 0)
+++ trunk/LayoutTests/js/script-tests/global-isNaN.js        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+description(&quot;Test the basic behaviors of global isNaN()&quot;);
+
+var globalObject = (1,eval)(&quot;this&quot;);
+
+shouldBeTrue('globalObject.hasOwnProperty(&quot;isNaN&quot;)');
+shouldBeEqualToString('typeof isNaN', 'function');
+
+// Function properties.
+shouldBe('isNaN.length', '1');
+shouldBeEqualToString('isNaN.name', 'isNaN');
+shouldBe('Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).configurable', 'true');
+shouldBe('Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).enumerable', 'false');
+shouldBe('Object.getOwnPropertyDescriptor(globalObject, &quot;isNaN&quot;).writable', 'true');
+
+// Some simple cases.
+shouldBeTrue('isNaN()');
+shouldBeTrue('isNaN(NaN)');
+shouldBeTrue('isNaN(undefined)');
+
+shouldBeFalse('isNaN(0)');
+shouldBeFalse('isNaN(-0)');
+shouldBeFalse('isNaN(1)');
+shouldBeFalse('isNaN(-1)');
+shouldBeFalse('isNaN(42)');
+shouldBeFalse('isNaN(123.5)');
+shouldBeFalse('isNaN(-123.5)');
+
+shouldBeFalse('isNaN(Number.MAX_VALUE)');
+shouldBeFalse('isNaN(Number.MIN_VALUE)');
+shouldBeFalse('isNaN(Number.MAX_SAFE_INTEGER)');
+shouldBeFalse('isNaN(Number.MIN_SAFE_INTEGER)');
+shouldBeFalse('isNaN(Math.PI)');
+shouldBeFalse('isNaN(Math.E)');
+shouldBeFalse('isNaN(Infinity)');
+shouldBeFalse('isNaN(-Infinity)');
+shouldBeFalse('isNaN(null)');
+
+// Non-numeric.
+shouldBeTrue('isNaN({})');
+shouldBeTrue('isNaN({ webkit: &quot;awesome&quot; })');
+shouldBeFalse('isNaN([])');
+shouldBeFalse('isNaN([123])');
+shouldBeTrue('isNaN([1,1])');
+shouldBeTrue('isNaN([NaN])');
+shouldBeFalse('isNaN(&quot;&quot;)');
+shouldBeFalse('isNaN(&quot;1&quot;)');
+shouldBeTrue('isNaN(&quot;x&quot;)');
+shouldBeTrue('isNaN(&quot;NaN&quot;)');
+shouldBeFalse('isNaN(&quot;Infinity&quot;)');
+shouldBeFalse('isNaN(true)');
+shouldBeFalse('isNaN(false)');
+shouldBeTrue('isNaN(function(){})');
+shouldBeTrue('isNaN(isNaN)');
+shouldThrow('isNaN(Symbol())');
+
+// Type conversion.
+var objectConvertToString = { toString: function() { return &quot;42&quot;; } };
+shouldBeFalse('isNaN(objectConvertToString)');
+
+var objectRecordToStringCall = { toStringCallCount: 0, toString: function() { this.toStringCallCount += 1; return &quot;42&quot;; } };
+shouldBeFalse('isNaN(objectRecordToStringCall)');
+shouldBe('objectRecordToStringCall.toStringCallCount', '1');
+
+var objectThrowOnToString = { toString: function() { throw &quot;No!&quot;; } };
+shouldThrow('isNaN(objectThrowOnToString)');
+
+var objectWithValueOf = { valueOf: function() { return 1.1; } };
+shouldBeFalse('isNaN(objectWithValueOf)');
+
+var objectThrowOnValueOf = { valueOf: function() { throw &quot;Nope!&quot; }, toString: function() { return 5; } };
+shouldThrow('isNaN(objectThrowOnValueOf)');
+
+var objectRecordValueOfCall = { valueOfCallCount: 0, valueOf: function() { ++this.valueOfCallCount; return NaN; } }
+shouldBeTrue('isNaN(objectRecordValueOfCall)');
+shouldBe('objectRecordValueOfCall.valueOfCallCount', '1');
+
+var objectRecordConversionCalls = {
+    callList: [],
+    toString: function() {
+        this.callList.push(&quot;toString&quot;);
+        return &quot;Bad&quot;;
+    },
+    valueOf: function() {
+        this.callList.push(&quot;valueOf&quot;);
+        return 12345;
+    }
+};
+shouldBeFalse('isNaN(objectRecordConversionCalls)');
+shouldBe('objectRecordConversionCalls.callList.toString()', '&quot;valueOf&quot;');
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsmathclz32js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/math-clz32.js (201679 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/math-clz32.js        2016-06-04 07:20:17 UTC (rev 201679)
+++ trunk/LayoutTests/js/script-tests/math-clz32.js        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Function properties.
</span><span class="cx"> shouldBe('Math.clz32.length', '1');
</span><del>-shouldBeEqualToString('Math.clz32.name', 'clz32')
</del><ins>+shouldBeEqualToString('Math.clz32.name', 'clz32');
</ins><span class="cx"> shouldBe('Object.getOwnPropertyDescriptor(Math, &quot;clz32&quot;).configurable', 'true');
</span><span class="cx"> shouldBe('Object.getOwnPropertyDescriptor(Math, &quot;clz32&quot;).enumerable', 'false');
</span><span class="cx"> shouldBe('Object.getOwnPropertyDescriptor(Math, &quot;clz32&quot;).writable', 'true');
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressmathclz32basicsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/math-clz32-basics.js (201679 => 201680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/math-clz32-basics.js        2016-06-04 07:20:17 UTC (rev 201679)
+++ trunk/Source/JavaScriptCore/tests/stress/math-clz32-basics.js        2016-06-04 18:58:08 UTC (rev 201680)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 
</span><span class="cx">     var clzMinusZero = mathClz32OnInteger(-0);
</span><span class="cx">     if (clzMinusZero != 32)
</span><del>-        throw &quot;mathClz32OnInteger(\&quot;-0\&quot;) = &quot; + clzMinusZero;
</del><ins>+        throw &quot;mathClz32OnInteger(-0) = &quot; + clzMinusZero;
</ins><span class="cx"> }
</span><span class="cx"> noInline(verifyMathClz32OnIntegerWithOtherTypes);
</span><span class="cx"> 
</span><span class="lines">@@ -70,9 +70,9 @@
</span><span class="cx"> {
</span><span class="cx">     return Math.clz32(value);
</span><span class="cx"> }
</span><del>-noInline(mathClz32OnInteger);
</del><ins>+noInline(mathClz32OnDouble);
</ins><span class="cx"> 
</span><del>-// Test simple cases on integers.
</del><ins>+// Test simple cases on doubles.
</ins><span class="cx"> function testMathClz32OnDoubles()
</span><span class="cx"> {
</span><span class="cx">     var value = mathClz32OnDouble(Math.PI);
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx">     var value = mathClz32OnDouble(-0);
</span><span class="cx">     if (value != 32)
</span><del>-        throw &quot;mathClz32OnDouble(0) = &quot; + value;
</del><ins>+        throw &quot;mathClz32OnDouble(-0) = &quot; + value;
</ins><span class="cx"> 
</span><span class="cx">     var value = mathClz32OnDouble(NaN);
</span><span class="cx">     if (value != 32)
</span></span></pre>
</div>
</div>

</body>
</html>