Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ui / test / scoped_fake_nswindow_main_status.h
blobea06a18e2f568c8ad45a6cc2c75ac30bcb6a5c49
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.
5 #ifndef CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
6 #define CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
8 #import "base/mac/scoped_objc_class_swizzler.h"
10 @class NSWindow;
12 // Simulates a particular NSWindow to report YES for [NSWindow isMainWindow].
13 // This allows test coverage of code relying on window focus changes without
14 // resorting to an interactive_ui_test.
15 class ScopedFakeNSWindowMainStatus {
16 public:
17 explicit ScopedFakeNSWindowMainStatus(NSWindow* window);
18 ~ScopedFakeNSWindowMainStatus();
20 private:
21 base::mac::ScopedObjCClassSwizzler swizzler_;
23 DISALLOW_COPY_AND_ASSIGN(ScopedFakeNSWindowMainStatus);
26 #endif // CHROME_BROWSER_UI_TEST_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_