From ddfe8bfead115244b743bdb34dfacd832e77e077 Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Tue, 8 Apr 2025 18:41:12 +0100 Subject: [PATCH] [cr137] `ExtensionBrowserTest::observer_` moved to base class This change adjusts how we are accessing these observers, as the field has been moved to a base class. Chromium changes: https://chromium.googlesource.com/chromium/src/+/f41b0b2533c8f2c870d26dffe97eb96809eba668 commit f41b0b2533c8f2c870d26dffe97eb96809eba668 Author: Devlin Cronin Date: Mon Apr 7 16:19:25 2025 -0700 [Extensions] Hoist observer_ to ExtensionPlatformBrowserTest ExtensionBrowserTest has a ChromeExtensionTestNotificationObserver member, `observer_`, which is used to wait for various extension- related events. ChromeExtensionTestNotificationObserver can't be included in the experimental desktop android build yet, but the parent class, ExtensionTestNotificationObserver, can. Add a `test_notification_observer_` member on ExtensionPlatformBrowserTest that's implemented as an ExtensionTestNotificationObserver by default, and overridden to the ChromeExtensionTestNotificationObserver in ExtensionBrowserTest. This allows us to move `ExtensionBrowserTest::WaitForExtensionViewsToLoad()` up to ExtensionPlatformBrowserTest and will enable more methods to move up in the future. This CL has no effective behavior change. Bug: 404581990 Change-Id: I252419e1ac891e993ba74df3ca922376ab7704aa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6435314 Reviewed-by: James Cook Commit-Queue: Devlin Cronin Cr-Commit-Position: refs/heads/main@{#1443826} --- browser/extensions/brave_extension_functional_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/extensions/brave_extension_functional_test.cc b/browser/extensions/brave_extension_functional_test.cc index fb5d7cee858..207aee70520 100644 --- a/browser/extensions/brave_extension_functional_test.cc +++ b/browser/extensions/brave_extension_functional_test.cc @@ -35,7 +35,7 @@ ExtensionFunctionalTest::InstallExtensionSilently( installer->InstallCrx(path); EXPECT_TRUE(registry_observer.WaitForExtensionInstalled()); - EXPECT_TRUE(observer_->WaitForExtensionViewsToLoad()); + EXPECT_TRUE(test_notification_observer()->WaitForExtensionViewsToLoad()); size_t num_after = registry->enabled_extensions().size(); EXPECT_EQ(num_before + 1, num_after);