Add syntax highlighting to the threading_and_tasks_testing.md examples.
Change-Id: Ib9710772ce534e49d42f51dd8c4b374d85659127
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823852
Commit-Queue: Gabriel Charette <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#700318}
diff --git a/docs/threading_and_tasks_testing.md b/docs/threading_and_tasks_testing.md
index 9bba4a2..e249cc1 100644
--- a/docs/threading_and_tasks_testing.md
+++ b/docs/threading_and_tasks_testing.md
@@ -49,7 +49,7 @@
Typically this will look something like this:
foo.h
-```
+```c++
class Foo {
public:
Foo() : owning_sequence_(base::SequencedTaskRunnerHandle::Get()) {}
@@ -69,7 +69,7 @@
```
foo_unittest.cc
-```
+```c++
TEST(FooTest, DoSomething) {
base::test::SingleThreadTaskEnvironment task_environment;
@@ -101,7 +101,7 @@
Typical use case:
foo_service.h
-```
+```c++
class FooService {
public:
FooService()
@@ -130,7 +130,7 @@
```
foo_service_unittest.cc
-```
+```c++
TEST(FooServiceTest, FlushAndReply) {
base::test::TaskEnvironment task_environment;
@@ -203,7 +203,7 @@
timeouts, etc. without any test-specific seams in the product code, e.g.:
foo_storage.h
-```
+```c++
class FooStorage {
public:
static constexpr base::TimeDelta::kFlushInterval =
@@ -215,7 +215,7 @@
```
foo_unittest.cc
-```
+```c++
class FooStorageTest {
public:
FooStorageTest() = default;
@@ -247,7 +247,7 @@
`TaskEnvironment::RunUntilIdle()` would run the delayed task, signalling the
event.
-```
+```c++
TEST(FooTest, TimeoutExceeded)
{
base::test::TaskEnvironment task_environment{
@@ -328,7 +328,7 @@
This typically looks like this (in this case `FooTestBase` opts to enforce
`MainThreadType::UI` and leaves other traits to be specified as desired):
-```
+```c++
// Constructs a FooTestBase with |traits| being forwarded to its
// TaskEnvironment. MainThreadType always defaults to UI and must not be
// specified.