diff options
author | Steve Block <steveblock@google.com> | 2010-04-27 16:31:00 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:12 +0100 |
commit | dcc8cf2e65d1aa555cce12431a16547e66b469ee (patch) | |
tree | 92a8d65cd5383bca9749f5327fb5e440563926e6 /LayoutTests/fast/js/resources | |
parent | ccac38a6b48843126402088a309597e682f40fe6 (diff) | |
download | external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2 |
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'LayoutTests/fast/js/resources')
4 files changed, 30 insertions, 7 deletions
diff --git a/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js b/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js index 880aed4..eb01411 100644 --- a/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js +++ b/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js @@ -39,6 +39,9 @@ descriptorShouldBe("Math.sin", "'length'", {writable: false, enumerable: false, descriptorShouldBe("Math.sin", "'name'", {writable: false, enumerable: false, configurable: false, value:"'sin'"}); var global = this; descriptorShouldBe("global", "'global'", {writable: true, enumerable: true, configurable: false, value:"global"}); +descriptorShouldBe("global", "'undefined'", {writable: false, enumerable: false, configurable: false, value:"undefined"}); +descriptorShouldBe("global", "'NaN'", {writable: false, enumerable: false, configurable: false, value:"NaN"}); +descriptorShouldBe("global", "'Infinity'", {writable: false, enumerable: false, configurable: false, value:"Infinity"}); descriptorShouldBe("global", "'window'", {writable: false, enumerable: true, configurable: false, value:"global"}); descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: true, configurable: false, value:"XMLHttpRequest"}); descriptorShouldBe("global", "'length'", {writable: true, enumerable: true, configurable: false, value:"global.length"}); diff --git a/LayoutTests/fast/js/resources/js-test-post-async.js b/LayoutTests/fast/js/resources/js-test-post-async.js new file mode 100644 index 0000000..76777aa --- /dev/null +++ b/LayoutTests/fast/js/resources/js-test-post-async.js @@ -0,0 +1,5 @@ +shouldBeTrue("successfullyParsed"); +debug('<br /><span class="pass">TEST COMPLETE</span>'); + +if (window.layoutTestController) + layoutTestController.notifyDone(); diff --git a/LayoutTests/fast/js/resources/js-test-post.js b/LayoutTests/fast/js/resources/js-test-post.js index 6d8a68f..88882c5 100644 --- a/LayoutTests/fast/js/resources/js-test-post.js +++ b/LayoutTests/fast/js/resources/js-test-post.js @@ -1,2 +1,13 @@ -shouldBeTrue("successfullyParsed"); -debug('<br /><span class="pass">TEST COMPLETE</span>'); +function finishJSTest() +{ + shouldBeTrue("successfullyParsed"); + debug('<br /><span class="pass">TEST COMPLETE</span>'); + if (window.jsTestIsAsync && window.layoutTestController) + layoutTestController.notifyDone(); +} + +if (window.jsTestIsAsync) { + if (window.layoutTestController) + layoutTestController.waitUntilDone(); +} else + finishJSTest(); diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js index b91812f..ecf5fd0 100644 --- a/LayoutTests/fast/js/resources/js-test-pre.js +++ b/LayoutTests/fast/js/resources/js-test-pre.js @@ -37,11 +37,15 @@ function testFailed(msg) function areArraysEqual(_a, _b) { - if (_a.length !== _b.length) - return false; - for (var i = 0; i < _a.length; i++) - if (_a[i] !== _b[i]) + try { + if (_a.length !== _b.length) return false; + for (var i = 0; i < _a.length; i++) + if (_a[i] !== _b[i]) + return false; + } catch (ex) { + return false; + } return true; } @@ -118,7 +122,7 @@ function shouldBeNull(_a) { shouldBe(_a, "null"); } function shouldBeEqualToString(a, b) { - var unevaledString = '"' + b.replace(/"/g, "\"") + '"'; + var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"'; shouldBe(a, unevaledString); } |