diff --git a/browser/ai_chat/code_execution_tool_browsertest.cc b/browser/ai_chat/code_execution_tool_browsertest.cc index 936ed590eaf..757f3870daa 100644 --- a/browser/ai_chat/code_execution_tool_browsertest.cc +++ b/browser/ai_chat/code_execution_tool_browsertest.cc @@ -314,14 +314,13 @@ IN_PROC_BROWSER_TEST_F(AIChatCodeExecutionToolBrowserTest, CreateLineChart) { ]; const labels = {sales: 'Sales ($)', profit: 'Profit ($)'}; chartUtil.createLineChart(data, labels); - console.log('Chart created'); )"; std::string output; std::vector artifacts; ExecuteCode(script, &output, &artifacts); - EXPECT_EQ(output, "Chart created"); + EXPECT_EQ(output, "Chart created successfully"); ASSERT_EQ(artifacts.size(), 1u); const auto& artifact = artifacts[0]; @@ -350,9 +349,7 @@ IN_PROC_BROWSER_TEST_F(AIChatCodeExecutionToolBrowserTest, std::vector artifacts; ExecuteCode(script, &output, &artifacts); - EXPECT_THAT( - output, - HasSubstr("Error: Artifact type 'unsupported_type' is not supported")); + EXPECT_EQ(output, "Error: Artifact type 'unsupported_type' is not supported"); EXPECT_TRUE(artifacts.empty()); } diff --git a/components/ai_chat/core/browser/tools/chart_code_plugin.cc b/components/ai_chat/core/browser/tools/chart_code_plugin.cc index 5adb935a911..73548aa1395 100644 --- a/components/ai_chat/core/browser/tools/chart_code_plugin.cc +++ b/components/ai_chat/core/browser/tools/chart_code_plugin.cc @@ -51,6 +51,7 @@ const chartUtil = { chartData.labels = labels; } codeExecArtifacts.push({ type: 'line_chart', content: chartData }); + console.log('Chart created successfully'); } }; )";