From 0937e10a03176ee1cea1c23aa96aa373b2bdb474 Mon Sep 17 00:00:00 2001 From: David Fugate <dfugate@microsoft.com> Date: Thu, 22 Sep 2011 11:41:30 -0700 Subject: [PATCH] Improved global scope 'missing error' error message. --- test/harness/gs.js | 4 ++-- website/resources/scripts/global/gs.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/harness/gs.js b/test/harness/gs.js index 37ad387f59..bd57897c94 100644 --- a/test/harness/gs.js +++ b/test/harness/gs.js @@ -25,11 +25,11 @@ if (testDescrip.negative !== undefined) { if (window.iframeError === undefined) { //no exception was thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('No exception was thrown; expected "' + testDescrip.negative + '".')); + Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".')); } else if (!(new RegExp(testDescrip.negative, "i").test(window.iframeError))) { //wrong type of exception thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('Expected an exception matching "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); + Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); } else { testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'pass', undefined); diff --git a/website/resources/scripts/global/gs.js b/website/resources/scripts/global/gs.js index 37ad387f59..bd57897c94 100644 --- a/website/resources/scripts/global/gs.js +++ b/website/resources/scripts/global/gs.js @@ -25,11 +25,11 @@ if (testDescrip.negative !== undefined) { if (window.iframeError === undefined) { //no exception was thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('No exception was thrown; expected "' + testDescrip.negative + '".')); + Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".')); } else if (!(new RegExp(testDescrip.negative, "i").test(window.iframeError))) { //wrong type of exception thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('Expected an exception matching "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); + Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); } else { testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'pass', undefined); -- GitLab