
Note to QA: This CL is purely mechanical and shouldn't be blamed for future regressions on touched files. This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/2211138 which already removed all usage using content::BrowserThread. Hence this script now matches unqualified BrowserThread:: without risking having "content::" be selected as "traits_before" by the regex (ran on same revision as step #1). content:: is now always added if outside namespace content {} (deleting unused using content::BrowserThread; decls) Script @ https://crbug.com/1026641#c92 (will TBR fdoray@ post-review for mechanical change) TBR=fdoray@hchromium.org AX-Relnotes: n/a. Bug: 1026641 Change-Id: I51ae2f83eb17d19b54563fd9b4fc040d2aa0c948 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212469 Commit-Queue: Gabriel Charette <gab@chromium.org> Reviewed-by: François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#772458}
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "base/bind.h"
|
|
#include "base/bind_helpers.h"
|
|
#include "base/memory/ref_counted.h"
|
|
#include "base/memory/scoped_refptr.h"
|
|
#include "base/memory/weak_ptr.h"
|
|
#include "base/run_loop.h"
|
|
#include "base/test/gtest_util.h"
|
|
#include "build/build_config.h"
|
|
#include "content/public/browser/browser_task_traits.h"
|
|
#include "content/public/browser/browser_thread.h"
|
|
#include "content/public/test/browser_test.h"
|
|
#include "content/public/test/content_browser_test.h"
|
|
#include "content/public/test/test_utils.h"
|
|
|
|
namespace content {
|
|
|
|
class BrowserThreadPostTaskBeforeInitBrowserTest : public ContentBrowserTest {
|
|
protected:
|
|
void SetUp() override {
|
|
// This should fail because the ThreadPool + TaskExecutor weren't created
|
|
// yet.
|
|
EXPECT_DCHECK_DEATH(
|
|
GetIOThreadTaskRunner({})->PostTask(FROM_HERE, base::DoNothing()));
|
|
|
|
// Obtaining a TaskRunner should also fail.
|
|
EXPECT_DCHECK_DEATH(GetIOThreadTaskRunner({}));
|
|
|
|
ContentBrowserTest::SetUp();
|
|
}
|
|
};
|
|
|
|
IN_PROC_BROWSER_TEST_F(BrowserThreadPostTaskBeforeInitBrowserTest,
|
|
ExpectFailures) {}
|
|
|
|
} // namespace content
|