Skip to content

Commit

Permalink
Merge pull request #15498 from brave/eth_provider_gin
Browse files Browse the repository at this point in the history
Migrate ethereum provider to gin::Wrappable
  • Loading branch information
yrliou authored Oct 26, 2022
2 parents b38dcb1 + 478e6a7 commit 2fb54c1
Show file tree
Hide file tree
Showing 11 changed files with 210 additions and 356 deletions.
37 changes: 11 additions & 26 deletions browser/brave_wallet/send_transaction_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,17 @@ IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest, IsUnlocked) {
.ExtractBool());
}

IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest, IsConnected) {
RestoreWallet();
GURL url =
https_server_for_files()->GetURL("a.com", "/send_transaction.html");
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), url));
EXPECT_TRUE(WaitForLoadStop(web_contents()));
EXPECT_TRUE(EvalJs(web_contents(), "getIsConnected()",
content::EXECUTE_SCRIPT_USE_MANUAL_REPLY)
.ExtractBool());
}

IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest,
EthSendTransactionEIP1559Tx) {
SetNetworkForTesting("0x1"); // mainnet
Expand Down Expand Up @@ -807,30 +818,4 @@ IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest,
true);
}

IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest,
EnsurePropertiesCantBeDeleted) {
GURL url =
https_server_for_files()->GetURL("a.com", "/send_transaction.html");
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), url));
EXPECT_TRUE(WaitForLoadStop(web_contents()));
ASSERT_EQ(EvalJs(web_contents(), "ensurePropertiesCantBeDeleted()",
content::EXECUTE_SCRIPT_USE_MANUAL_REPLY)
.ExtractBool(),
true);
}

IN_PROC_BROWSER_TEST_F(SendTransactionBrowserTest,
EnsurePropertiesCantBeDeletedNoOverwrite) {
brave_wallet_service_->SetDefaultEthereumWallet(
mojom::DefaultWallet::BraveWallet);
GURL url =
https_server_for_files()->GetURL("a.com", "/send_transaction.html");
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), url));
EXPECT_TRUE(WaitForLoadStop(web_contents()));
ASSERT_EQ(EvalJs(web_contents(), "ensurePropertiesCantBeDeleted()",
content::EXECUTE_SCRIPT_USE_MANUAL_REPLY)
.ExtractBool(),
true);
}

} // namespace brave_wallet
Loading

0 comments on commit 2fb54c1

Please sign in to comment.