#include <memory>
#include "base/command_line.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/sessions/content/session_tab_helper.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/api/file_system/file_system_api.h"
#include "extensions/browser/background_script_executor.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_action.h"
#include "extensions/browser/extension_action_manager.h"
#include "extensions/browser/extension_function_histogram_value.h"
#include "extensions/browser/extension_host_test_helper.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/script_result_queue.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/mojom/view_type.mojom.h"
#include "extensions/common/switches.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
namespace extensions {
namespace {
constexpr char kCheckApiAvailability[] = …;
}
class NativeBindingsApiTest : public ExtensionApiTest { … };
class NativeBindingsRestrictedToDeveloperModeApiTest
: public NativeBindingsApiTest { … };
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, SimpleEndToEndTest) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, SimpleAppTest) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, DeclarativeEvents) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, LazyListeners) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, FileSystemApiGetDisplayPath) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, WebRequest) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, ContextMenusTest) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, ErrorsInCallbackTest) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, WebUIBindings) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, APICreationFromNewContext) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, PromiseBasedAPI) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, MV2PromisesNotSupported) { … }
IN_PROC_BROWSER_TEST_F(
NativeBindingsRestrictedToDeveloperModeApiTest,
DeveloperModeOnlyWithAPIPermissionUserIsNotInDeveloperMode) { … }
IN_PROC_BROWSER_TEST_F(
NativeBindingsRestrictedToDeveloperModeApiTest,
DeveloperModeOnlyWithAPIPermissionUserIsInDeveloperMode) { … }
IN_PROC_BROWSER_TEST_F(
NativeBindingsRestrictedToDeveloperModeApiTest,
DeveloperModeOnlyWithoutAPIPermissionUserIsNotInDeveloperMode) { … }
IN_PROC_BROWSER_TEST_F(
NativeBindingsRestrictedToDeveloperModeApiTest,
DeveloperModeOnlyWithoutAPIPermissionUserIsInDeveloperMode) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsRestrictedToDeveloperModeApiTest,
SwitchingDeveloperModeAffectsExistingRenderers_Pages) { … }
IN_PROC_BROWSER_TEST_F(NativeBindingsRestrictedToDeveloperModeApiTest,
IncognitoRenderersUseOriginalProfilesDevModeSetting) { … }
IN_PROC_BROWSER_TEST_F(
NativeBindingsRestrictedToDeveloperModeApiTest,
DISABLED_SwitchingDeveloperModeAffectsExistingRenderers_ServiceWorkers) { … }
}