tl;dr you probably want ui_test_utils::ShowAndFocusNativeWindow()
browser_tests isn't given an "activation policy" on Mac. Applications on Mac that are just binaries (i.e. not in a .app bundle) have a default activation policy of NSApplicationActivationPolicyProhibited meaning it can't get key status and effectively ignores [
NSApp activateIgnoringOtherApps]. Calling [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular] will give it "normal" behavior. *But* keep reading..
A Cocoa interactive_ui_test on Mac can call ui_test_utils::ShowAndFocusNativeWindow which (instead of setActivationPolicy) does TransformProcessType(&psn,kProcessTransformToForegroundApplication). Which probably amounts to the same thing.
You're probably not doing toolkit-views on Mac (I haven't flipped that flag yet :p) but a bunch of interactive_ui_tests for that on Mac inherit from ViewsTestBase which calls code in ViewsTestHelperMac that does [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; to allow some tests to work in a sane manner. But as Marc-Antoine points out, you still need to be careful that browser_tests run in parallel and you can't rely on things like [NSApp keyWindow] giving a sane/non-flaky answer on they trybots.
And of course the usual caveat applies -- interactive_ui_tests generally suck (they are slow and flaky) and if you can get the same coverage in a browser_test, chromium is generally better off. You might be interested in ui::test::EventGenerator, but EventGeneratorDelegateMac needs to be moved out of "toolkit-views" (it didn't have a client outside of toolkit-views, but there's not really a views dependency). views::test::InitializeMacEventGeneratorDelegate() needs to be called, which only happens in a toolkit-views build.