[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 <rdevlin.cronin@chromium.org> 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 <jamescook@chromium.org> Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1443826}
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user