| Index: content/test/content_browser_test_test.cc
|
| diff --git a/content/test/content_browser_test_test.cc b/content/test/content_browser_test_test.cc
|
| index 42a89013db258e7641e3887121483df30e2cd6b7..cba31c8bc6144e87170b9bb6f23463fb153777bc 100644
|
| --- a/content/test/content_browser_test_test.cc
|
| +++ b/content/test/content_browser_test_test.cc
|
| @@ -9,6 +9,7 @@
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/test/browser_test_utils.h"
|
| #include "content/public/test/content_browser_test_utils.h"
|
| +#include "content/public/test/test_utils.h"
|
| #include "content/shell/browser/shell.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -47,4 +48,20 @@ IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, SingleProcess) {
|
| Test();
|
| }
|
|
|
| +namespace {
|
| +
|
| +void CallbackChecker(bool* non_nested_task_ran) {
|
| + *non_nested_task_ran = true;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) {
|
| + bool non_nested_task_ran = false;
|
| + base::MessageLoop::current()->PostNonNestableTask(
|
| + FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
|
| + content::RunAllPendingInMessageLoop();
|
| + ASSERT_TRUE(non_nested_task_ran);
|
| +}
|
| +
|
| } // namespace content
|
|
|