Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / public / common / injection_test_mac.h
blobc95e86a938a55c5ab7f9a6ffc14f27f412bdd8b8
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_
6 #define CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_
8 #import <Foundation/Foundation.h>
10 #include <string>
12 // Callback function used by sandbox tests to print error messages. It's
13 // provided in order to avoid linking the logging code of the renderer into this
14 // loadable bundle. RendererMainPlatformDelegate provides an implementation.
16 // |message| - the message that's printed.
17 // |is_error| - true if this is an error message, false if an info message.
18 typedef void (*LogRendererSandboxTestMessage)(std::string message,
19 bool is_error);
21 // An ObjC wrapper around sandbox tests.
22 @interface RendererSandboxTestsRunner : NSObject
24 // Sets the function that logs the progress of the tests.
25 + (void)setLogFunction:(LogRendererSandboxTestMessage)logFunction;
27 // Runs all tests and logs its progress using the provided log function.
28 // Returns YES if all tests passed, NO otherwise. This method should be called
29 // after the sandbox has been turned on.
30 + (BOOL)runTests;
32 @end
34 #endif // CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_