From 19a18cad753f93e24297a170afad652af0c66239 Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Fri, 27 Jul 2012 18:16:11 -0700 Subject: [PATCH] Bug 777589 - Fix regress-50447-1.js, don't work around it in the harness; r=sfink --- .../tests/js1_5/extensions/regress-50447-1.js | 18 ++++-------------- js/src/tests/lib/tests.py | 3 +-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/js/src/tests/js1_5/extensions/regress-50447-1.js b/js/src/tests/js1_5/extensions/regress-50447-1.js index 26b218a9193..55ca6aca7f0 100644 --- a/js/src/tests/js1_5/extensions/regress-50447-1.js +++ b/js/src/tests/js1_5/extensions/regress-50447-1.js @@ -99,14 +99,9 @@ function test2() test file and assumes the path to the test case is a subdirectory of the directory containing jsDriver.pl */ - var expectedLine = 114; + var expectedLine = 109; var expectedFileName = 'js1_5/extensions/regress-50447-1.js'; - if (typeof document == "undefined") - { - expectedFileName = './' + expectedFileName; - } - else - { + if (typeof document != "undefined") { expectedFileName = document.location.href. replace(/[^\/]*(\?.*)$/, '') + expectedFileName; @@ -137,12 +132,7 @@ function test3() enterFunc ("test3"); var expectedFileName = 'js1_5/extensions/regress-50447-1.js'; - if (typeof document == "undefined") - { - expectedFileName = './' + expectedFileName; - } - else - { + if (typeof document != "undefined") { expectedFileName = document.location.href. replace(/[^\/]*(\?.*)$/, '') + expectedFileName; @@ -168,7 +158,7 @@ function test4() /* generate an error with only msg and filename properties */ enterFunc ("test4"); - var expectedLine = 173; + var expectedLine = 163; var e = new InternalError ("msg", "file"); reportCompare ("(new InternalError(\"msg\", \"file\", " + expectedLine + "))", diff --git a/js/src/tests/lib/tests.py b/js/src/tests/lib/tests.py index dcae56555dc..6f29e99978c 100644 --- a/js/src/tests/lib/tests.py +++ b/js/src/tests/lib/tests.py @@ -86,8 +86,7 @@ class Test(object): cmd = cmd + Test.prefix_command(dirname) if self.debugMode: cmd += [ '-d' ] - # There is a test that requires the path to start with './'. - cmd += [ '-f', './' + self.path ] + cmd += [ '-f', self.path ] return cmd def run(self, js_cmd_prefix, timeout=30.0):