[Extensions] Investigate WaitForPopup() test failures

ExtensionActionTestHelper::WaitForPopup() has been seen to fail
flakily in a number of tests, but it's not clear at which stage it's
failing. Currently, this method returns a bool if it was successful;
however, all call sites expect it to succeed.

Change the early-outs and false-returns in WaitForPopup() to be
ASSERTs so that test failures will indicate which line failed, rather
than simply indicating that WaitForPopup() failed. This will help us
in tracking down why the tests are flaking.

Bug: 347700029
Change-Id: I6f31200bff211223864e0350e6a92f07e395e544
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5691047
Reviewed-by: Emilia Paz <[email protected]>
Reviewed-by: Florian Jacky <[email protected]>
Commit-Queue: Devlin Cronin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1326449}
diff --git a/chrome/browser/ui/extensions/extension_action_test_helper.h b/chrome/browser/ui/extensions/extension_action_test_helper.h
index 434668d8..8e237b9 100644
--- a/chrome/browser/ui/extensions/extension_action_test_helper.h
+++ b/chrome/browser/ui/extensions/extension_action_test_helper.h
@@ -60,10 +60,10 @@
   virtual gfx::NativeView GetPopupNativeView() = 0;
 
   // Spins a RunLoop until the NativeWindow hosting |GetPopupNativeView()| is
-  // reported as active by the OS. Returns true if successful. This method is
-  // strange: it's not overridden by subclasses, and instead the implementation
-  // is selected at compile-time depending on the windowing system in use.
-  bool WaitForPopup();
+  // reported as active by the OS. This method is strange: it's not overridden
+  // by subclasses, and instead the implementation is selected at compile-time
+  // depending on the windowing system in use.
+  void WaitForPopup();
 
   // Returns whether a browser action popup is being shown currently.
   virtual bool HasPopup() = 0;