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

Unified Diff: ui/views/test/widget_test_mac.mm

Issue 1782773002: MacViews: Fix ViewTest.HandleAccelerator by faking window activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Faked activations for everyone! Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/test/widget_test.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/widget_test_mac.mm
diff --git a/ui/views/test/widget_test_mac.mm b/ui/views/test/widget_test_mac.mm
index 47a88e5fb9f8db743bba27e7b05f59b1b0efe415..b63f41cce058ec3670410208f26b8a6a450c284b 100644
--- a/ui/views/test/widget_test_mac.mm
+++ b/ui/views/test/widget_test_mac.mm
@@ -13,33 +13,11 @@
#include "ui/views/widget/native_widget_mac.h"
#include "ui/views/widget/root_view.h"
-@interface IsKeyWindowDonor : NSObject
-@end
-
-@implementation IsKeyWindowDonor
-- (BOOL)isKeyWindow {
- return YES;
-}
-@end
-
namespace views {
namespace test {
namespace {
-class FakeActivationMac : public WidgetTest::FakeActivation {
- public:
- FakeActivationMac()
- : swizzler_([NSWindow class],
- [IsKeyWindowDonor class],
- @selector(isKeyWindow)) {}
-
- private:
- base::mac::ScopedObjCClassSwizzler swizzler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeActivationMac);
-};
-
// The NSWindow last activated by SimulateNativeActivate(). It will have a
// simulated deactivate on a subsequent call.
NSWindow* g_simulated_active_window_ = nil;
@@ -107,11 +85,6 @@ ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) {
}
// static
-scoped_ptr<WidgetTest::FakeActivation> WidgetTest::FakeWidgetIsActiveAlways() {
- return make_scoped_ptr(new FakeActivationMac);
-}
-
-// static
ui::internal::InputMethodDelegate* WidgetTest::GetInputMethodDelegateForWidget(
Widget* widget) {
return NativeWidgetMac::GetBridgeForNativeWindow(widget->GetNativeWindow());
« no previous file with comments | « ui/views/test/widget_test.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698