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

Side by Side Diff: chrome/browser/ui/test/scoped_fake_nswindow_main_status.h

Issue 1268293002: [MacViews] Fix AccessiblePaneViewTest.SetPaneFocusAndRestore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove roque delta. Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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 CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
6 #define CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
7
8 #include "base/memory/scoped_ptr.h"
9
10 namespace base {
11 namespace mac {
12 class ScopedObjCClassSwizzler;
13 }
14 }
15
16 @class NSWindow;
17
18 // Simulates a particular NSWindow to report YES for [NSWindow isMainWindow].
19 // This allows test coverage of code relying on window focus changes without
20 // resorting to an interactive_ui_test.
21 class ScopedFakeNSWindowMainStatus {
22 public:
23 explicit ScopedFakeNSWindowMainStatus(NSWindow* window);
24 ~ScopedFakeNSWindowMainStatus();
25
26 private:
27 scoped_ptr<base::mac::ScopedObjCClassSwizzler> swizzler_;
28
29 DISALLOW_COPY_AND_ASSIGN(ScopedFakeNSWindowMainStatus);
30 };
31
32 #endif // CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698