Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: content/test/content_browser_test_test.cc

Issue 733533002: Do not start RunLoop of MessagePumpForUI in NestedMessagePumpAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip quit request when loop isn't running Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698