1// Copyright (c) 2010 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. 4 5#ifndef BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ 6#define BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ 7#pragma once 8 9#if defined(__OBJC__) 10 11#import <AppKit/AppKit.h> 12 13#include "base/message_pump_mac.h" 14 15// A mock implementation of CrAppProtocol that claims that -sendEvent: is never 16// on the stack. This can be used in tests that need an NSApplication and use a 17// runloop, but don't run nested message loops. 18@interface MockCrApp : NSApplication<CrAppProtocol> 19@end 20 21#endif 22 23// To be used to instantiate MockCrApp from C++ code. 24namespace mock_cr_app { 25void RegisterMockCrApp(); 26} // namespace mock_cr_app 27 28#endif // BASE_TEST_MOCK_CHROME_APPLICATION_MAC_H_ 29