Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / script-tests / dfg-logical-not-final-object-or-other.js
blob9ea0a37506211203d863b1835e336177ea0fb80e
1 description(
2 "Tests that logical not of an object where it is predicted either final object or other (i.e. null or undefined) performs correctly when document.all is present."
3 );
5 if (document.all)
6 var unused = 1;
8 function foo(a) {
9 var t = !a;
11 if (a == 16)
12 return -1;
14 if (t)
15 return false;
16 return true;
19 for (var i = 0; i < 100; ++i) {
20 if (i%2) {
21 var o = {f:42};
22 shouldBe("foo(o)", "true");
23 } else
24 shouldBe("foo(null)", "false");