// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_RENDERER_BINDINGS_TEST_JS_RUNNER_H_ #define EXTENSIONS_RENDERER_BINDINGS_TEST_JS_RUNNER_H_ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "extensions/renderer/bindings/js_runner.h" namespace extensions { // A JSRunner implementation designed for use in unit tests. Does not handle // any kind of script suspension. By default, all functions are expected to // succeed and not throw any exceptions. If running a function is expected to // result in errors, use a TestJSRunner::AllowErrors object in as narrow a // scope as possible. class TestJSRunner : public JSRunner { … }; } // namespace extensions #endif // EXTENSIONS_RENDERER_BINDINGS_TEST_JS_RUNNER_H_