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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/content_browser_test.h" 5 #include "content/public/test/content_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
11 #include "content/public/test/content_browser_test_utils.h" 11 #include "content/public/test/content_browser_test_utils.h"
12 #include "content/public/test/test_utils.h"
12 #include "content/shell/browser/shell.h" 13 #include "content/shell/browser/shell.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) { 18 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) {
18 // Ensures that tests with MANUAL_ prefix don't run automatically. 19 // Ensures that tests with MANUAL_ prefix don't run automatically.
19 ASSERT_TRUE(false); 20 ASSERT_TRUE(false);
20 } 21 }
21 22
(...skipping 18 matching lines...) Expand all
40 }; 41 };
41 42
42 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, Basic) { 43 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, Basic) {
43 Test(); 44 Test();
44 } 45 }
45 46
46 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, SingleProcess) { 47 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, SingleProcess) {
47 Test(); 48 Test();
48 } 49 }
49 50
51 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.
52 *non_nested_task_ran = true;
53 }
54
55 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) {
56 bool non_nested_task_ran = false;
57 base::MessageLoop::current()->PostNonNestableTask(
58 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
59 content::RunAllPendingInMessageLoop();
60 ASSERT_TRUE(non_nested_task_ran);
61 }
62
50 } // namespace content 63 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698