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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Issue 322623002: Consolidate SDK forwards in sdk_forward_declarations.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/mac/scoped_nsautorelease_pool.h" 8 #include "base/mac/scoped_nsautorelease_pool.h"
9 #include "base/mac/sdk_forward_declarations.h"
9 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/browser_thread_impl.h" 11 #include "content/browser/browser_thread_impl.h"
11 #include "content/browser/renderer_host/render_widget_host_delegate.h" 12 #include "content/browser/renderer_host/render_widget_host_delegate.h"
12 #include "content/common/gpu/gpu_messages.h" 13 #include "content/common/gpu/gpu_messages.h"
13 #include "content/common/input_messages.h" 14 #include "content/common/input_messages.h"
14 #include "content/common/view_messages.h" 15 #include "content/common/view_messages.h"
15 #include "content/public/browser/notification_types.h" 16 #include "content/public/browser/notification_types.h"
16 #include "content/public/browser/render_widget_host_view_mac_delegate.h" 17 #include "content/public/browser/render_widget_host_view_mac_delegate.h"
17 #include "content/public/test/mock_render_process_host.h" 18 #include "content/public/test/mock_render_process_host.h"
18 #include "content/public/test/test_browser_context.h" 19 #include "content/public/test/test_browser_context.h"
19 #include "content/public/test/test_utils.h" 20 #include "content/public/test/test_utils.h"
20 #include "content/test/test_render_view_host.h" 21 #include "content/test/test_render_view_host.h"
21 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
22 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
23 #include "ui/events/test/cocoa_test_event_utils.h" 24 #include "ui/events/test/cocoa_test_event_utils.h"
24 #import "ui/gfx/test/ui_cocoa_test_helper.h" 25 #import "ui/gfx/test/ui_cocoa_test_helper.h"
25 26
26 // Declare things that are part of the 10.7 SDK.
27 #if !defined(MAC_OS_X_VERSION_10_7) || \
28 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
29 enum {
30 NSEventPhaseNone = 0, // event not associated with a phase.
31 NSEventPhaseBegan = 0x1 << 0,
32 NSEventPhaseStationary = 0x1 << 1,
33 NSEventPhaseChanged = 0x1 << 2,
34 NSEventPhaseEnded = 0x1 << 3,
35 NSEventPhaseCancelled = 0x1 << 4,
36 };
37 typedef NSUInteger NSEventPhase;
38
39 @interface NSEvent (LionAPI)
40 - (NSEventPhase)phase;
41 @end
42
43 #endif // 10.7
44
45 // Helper class with methods used to mock -[NSEvent phase], used by 27 // Helper class with methods used to mock -[NSEvent phase], used by
46 // |MockScrollWheelEventWithPhase()|. 28 // |MockScrollWheelEventWithPhase()|.
47 @interface MockPhaseMethods : NSObject { 29 @interface MockPhaseMethods : NSObject {
48 } 30 }
49 31
50 - (NSEventPhase)phaseBegan; 32 - (NSEventPhase)phaseBegan;
51 - (NSEventPhase)phaseChanged; 33 - (NSEventPhase)phaseChanged;
52 - (NSEventPhase)phaseEnded; 34 - (NSEventPhase)phaseEnded;
53 @end 35 @end
54 36
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 host->OnMessageReceived(*response2); 768 host->OnMessageReceived(*response2);
787 769
788 // Check that the view delegate ignored the empty unhandled wheel event. 770 // Check that the view delegate ignored the empty unhandled wheel event.
789 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived); 771 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived);
790 772
791 // Clean up. 773 // Clean up.
792 host->Shutdown(); 774 host->Shutdown();
793 } 775 }
794 776
795 } // namespace content 777 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/browser/theme_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698