diff --git a/dom/base/FuzzingFunctions.cpp b/dom/base/FuzzingFunctions.cpp index 08d408a3d0c4..15ba1339e545 100644 --- a/dom/base/FuzzingFunctions.cpp +++ b/dom/base/FuzzingFunctions.cpp @@ -8,6 +8,8 @@ #include "nsJSEnvironment.h" #include "js/GCAPI.h" +#include "nsIAccessibilityService.h" +#include "xpcAccessibilityService.h" namespace mozilla { namespace dom { @@ -26,5 +28,18 @@ FuzzingFunctions::CycleCollect(const GlobalObject&) nsJSContext::CycleCollectNow(); } +/* static */ void +FuzzingFunctions::EnableAccessibility(const GlobalObject&, + ErrorResult& aRv) +{ + RefPtr a11y; + nsresult rv; + + rv = NS_GetAccessibilityService(getter_AddRefs(a11y)); + if (NS_FAILED(rv)) { + aRv.Throw(rv); + } +} + } // namespace dom } // namespace mozilla diff --git a/dom/base/FuzzingFunctions.h b/dom/base/FuzzingFunctions.h index 98799012f1f2..93aad43befb7 100644 --- a/dom/base/FuzzingFunctions.h +++ b/dom/base/FuzzingFunctions.h @@ -20,6 +20,9 @@ public: static void CycleCollect(const GlobalObject&); + + static void + EnableAccessibility(const GlobalObject&, ErrorResult& aRv); }; } // namespace dom diff --git a/dom/webidl/FuzzingFunctions.webidl b/dom/webidl/FuzzingFunctions.webidl index b8f362c86db0..268db55436a2 100644 --- a/dom/webidl/FuzzingFunctions.webidl +++ b/dom/webidl/FuzzingFunctions.webidl @@ -21,4 +21,10 @@ interface FuzzingFunctions { * Synchronously perform a cycle collection. */ static void cycleCollect(); + + /** + * Enable accessibility. + */ + [Throws] + static void enableAccessibility(); };