From 817c75da3d52af4ecad673777e97a868339a3045 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 22 Mar 2013 19:57:08 -0400 Subject: [PATCH] Bug 849230 follow-up: Fix expectException to actually check the exception code, and don't use imaginary DOMException names! --HG-- extra : rebase_source : df53ddca50487bfc10676fd43e98abb949a2c298 --- content/media/webaudio/test/test_AudioBuffer.html | 4 ++-- content/media/webaudio/test/webaudio.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/media/webaudio/test/test_AudioBuffer.html b/content/media/webaudio/test/test_AudioBuffer.html index 6852123db886..fba2f8ab4a72 100644 --- a/content/media/webaudio/test/test_AudioBuffer.html +++ b/content/media/webaudio/test/test_AudioBuffer.html @@ -37,10 +37,10 @@ addLoadEvent(function() { } expectException(function() { context.createBuffer(2, 2048, 7999); - }, DOMException.DOM_SYNTAX_ERR); + }, DOMException.SYNTAX_ERR); expectException(function() { context.createBuffer(2, 2048, 96001); - }, DOMException.DOM_SYNTAX_ERR); + }, DOMException.SYNTAX_ERR); context.createBuffer(2, 2048, 8000); // no exception context.createBuffer(2, 2048, 96000); // no exception SpecialPowers.clearUserPref("media.webaudio.enabled"); diff --git a/content/media/webaudio/test/webaudio.js b/content/media/webaudio/test/webaudio.js index 445a0d85837c..456c1e24e3f8 100644 --- a/content/media/webaudio/test/webaudio.js +++ b/content/media/webaudio/test/webaudio.js @@ -7,7 +7,7 @@ function expectException(func, exceptionCode) { } catch (ex) { threw = true; ok(ex instanceof DOMException, "Expect a DOM exception"); - ok(ex.code, exceptionCode, "Expect the correct exception code"); + is(ex.code, exceptionCode, "Expect the correct exception code"); } ok(threw, "The exception was thrown"); }