Commit 6ee05d20 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[filesapp] Add CollectCodeCoverage test_name argument

Instead of "fake_test_name", collect coverage for the given test_name,
which would be the browser test fixture name in practice.

Tbr: benreich
Bug: 1113941
Change-Id: Ib6b4a30cc09a37def86d3f0267a2596cda370602
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2483731Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818351}
parent d41cb35a
......@@ -59,7 +59,7 @@ class DevToolsListenerBrowserTest : public content::DevToolsAgentHostObserver,
LOG(FATAL) << "Host crashed: " << DevToolsListener::HostString(host);
}
void CollectCodeCoverage() {
void CollectCodeCoverage(const std::string test_name) {
base::ScopedAllowBlockingForTesting allow_blocking;
CHECK(tmp_dir_.CreateUniqueTempDir());
......@@ -70,7 +70,7 @@ class DevToolsListenerBrowserTest : public content::DevToolsAgentHostObserver,
for (auto& agent : devtools_agent_) {
auto* host = agent.first;
EXPECT_TRUE(agent.second->HasCoverage(host));
agent.second->GetCoverage(host, coverage_store, "fake_test_name");
agent.second->GetCoverage(host, coverage_store, test_name);
agent.second->Detach(host);
}
......@@ -106,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsListenerBrowserTest, CanCollectCodeCoverage) {
content::DevToolsAgentHost::RemoveObserver(this);
content::RunAllTasksUntilIdle();
CollectCodeCoverage();
CollectCodeCoverage("CanCollectCodeCoverage");
content::DevToolsAgentHost::DetachAllClients();
content::RunAllTasksUntilIdle();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment