Merge pull request #11437 from brave/network-audit-wallet

Add wallet page load to the network audit test
This commit is contained in:
Brian R. Bondy
2021-12-06 13:29:25 -05:00
committed by GitHub
3 changed files with 9 additions and 1 deletions
@@ -63,6 +63,11 @@ void BraveWalletServiceDelegateImpl::IsExternalWalletInitialized(
IsExternalWalletInitializedCallback callback) {
std::unique_ptr<ExternalWalletsImporter> importer =
std::make_unique<ExternalWalletsImporter>(type, context_);
// Do not try to init the importer when external wallet is not installed
if (!importer->IsExternalWalletInstalled()) {
std::move(callback).Run(false);
return;
}
importer->Initialize(base::BindOnce(
&BraveWalletServiceDelegateImpl::ContinueIsExternalWalletInitialized,
weak_ptr_factory_.GetWeakPtr(), std::move(importer),
@@ -284,6 +284,9 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkAuditTest, BasicTests) {
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL("brave://rewards")));
ASSERT_TRUE(EnableBraveRewards());
WaitForTimeout(kMaxTimeoutPerLoadedURL);
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL("brave://wallet")));
WaitForTimeout(kMaxTimeoutPerLoadedURL);
}
} // namespace
+1 -1
View File
@@ -19,7 +19,7 @@
"update_patches": "node ./build/commands/scripts/commands.js update_patches",
"apply_patches": "node ./build/commands/scripts/commands.js apply_patches",
"start": "node ./build/commands/scripts/commands.js start",
"network-audit": "npm run test brave_network_audit_tests -- --ui-test-action-timeout=330000 --test-launcher-timeout=1000000",
"network-audit": "npm run test brave_network_audit_tests -- --ui-test-action-timeout=330000 --test-launcher-timeout=1300000",
"push_l10n": "node ./build/commands/scripts/commands.js push_l10n",
"pull_l10n": "node ./build/commands/scripts/commands.js pull_l10n",
"chromium_rebase_l10n": "node ./build/commands/scripts/commands.js chromium_rebase_l10n",