Commit c2f932f3 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Remaining changes to build all code in src.git with -Wimplicit-fallthrough.

Fixes a bug where TaskManagerTester::GetColumnValue() would return the
ColumnSpecifier::TOTAL_NETWORK_USE value for ColumnSpecifier::NETWORK_USE.

Change a test that was relying on the broken behavior to query
TOTAL_NETWORK_USE instead of NETWORK_USE, which also happens to fix
a TODO in that test.

This CL was uploaded by git cl split.

R=afakhry@chromium.org

Bug: 177475
Change-Id: I1c146e4f60c41f024a0f32f0924b4d0811a9a620
Reviewed-on: https://chromium-review.googlesource.com/891885
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532927}
parent 8815bfb5
......@@ -94,6 +94,7 @@ base::string16 GetLocalizedTitle(const base::string16& title,
return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_RENDERER_PREFIX,
result_title);
}
FALLTHROUGH;
}
// These types don't need display names or get them from elsewhere.
case content::PROCESS_TYPE_BROWSER:
......
......@@ -698,12 +698,8 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, SentDataObserved) {
->GetActiveWebContents()
->GetMainFrame()
->ExecuteJavaScriptForTests(base::UTF8ToUTF16(test_js));
// TODO(cburn): The assertion below currently assumes that the rate
// contribution of the entire 16MB upload arrives in a single refresh cycle.
// That's true now because it's only reported when the transaction completes,
// but if that changes in the future, this assertion may need to change.
ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerStatToExceed(
MatchTab("network use"), ColumnSpecifier::NETWORK_USE, 16000000));
MatchTab("network use"), ColumnSpecifier::TOTAL_NETWORK_USE, 16000000));
}
IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, TotalSentDataObserved) {
......
......@@ -168,6 +168,7 @@ int64_t TaskManagerTester::GetColumnValue(ColumnSpecifier column, int row) {
case ColumnSpecifier::NETWORK_USE:
value = task_manager()->GetNetworkUsage(task_id);
success = true;
break;
case ColumnSpecifier::TOTAL_NETWORK_USE:
value = task_manager()->GetCumulativeNetworkUsage(task_id);
success = true;
......
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