Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/public/common/injection_test_mac.h

Issue 10827282: Move the injection test API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_TEST_SECURITY_TESTS_RENDERER_SANDBOX_TESTS_MAC_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_
6 #define CHROME_TEST_SECURITY_TESTS_RENDERER_SANDBOX_TESTS_MAC_H_ 6 #define CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 // Callback function used by sandbox tests to print error messages. It's 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 13 // provided in order to avoid linking the logging code of the renderer into this
14 // loadable bundle. RendererMainPlatformDelegate provides an implementation. 14 // loadable bundle. RendererMainPlatformDelegate provides an implementation.
15 // 15 //
16 // |message| - the message that's printed. 16 // |message| - the message that's printed.
17 // |is_error| - true if this is an error message, false if an info message. 17 // |is_error| - true if this is an error message, false if an info message.
18 typedef void (*LogRendererSandboxTestMessage)(std::string message, 18 typedef void (*LogRendererSandboxTestMessage)(std::string message,
19 bool is_error); 19 bool is_error);
20 20
21 // An ObjC wrapper around sandbox tests. 21 // An ObjC wrapper around sandbox tests.
22 @interface RendererSandboxTestsRunner : NSObject 22 @interface RendererSandboxTestsRunner : NSObject
23 23
24 // Sets the function that logs the progress of the tests. 24 // Sets the function that logs the progress of the tests.
25 + (void)setLogFunction:(LogRendererSandboxTestMessage)logFunction; 25 + (void)setLogFunction:(LogRendererSandboxTestMessage)logFunction;
26 26
27 // Runs all tests and logs its progress using the provided log function. 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 28 // Returns YES if all tests passed, NO otherwise. This method should be called
29 // after the sandbox has been turned on. 29 // after the sandbox has been turned on.
30 + (BOOL)runTests; 30 + (BOOL)runTests;
31 31
32 @end 32 @end
33 33
34 #endif // CHROME_TEST_SECURITY_TESTS_RENDERER_SANDBOX_TESTS_MAC_H_ 34 #endif // CONTENT_PUBLIC_COMMON_INJECTION_TEST_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698