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..9037c532f98b2964bac8d0226848910b62136a7c 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,16 @@ IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, SingleProcess) { |
Test(); |
} |
+void CallbackChecker(bool* non_nested_task_ran) { |
ncarter (slow)
2014/11/18 18:02:53
This should be in an anonymous namespace {}, to pr
Jaekyun Seok (inactive)
2014/11/18 22:38:22
Done.
|
+ *non_nested_task_ran = true; |
+} |
+ |
+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 |