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

Side by Side Diff: content/test/content_browser_test_test.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 months 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/location.h"
9 #include "base/single_thread_task_runner.h"
8 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/thread_task_runner_handle.h"
9 #include "content/public/common/content_switches.h" 12 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h" 13 #include "content/public/test/browser_test_utils.h"
11 #include "content/public/test/content_browser_test_utils.h" 14 #include "content/public/test/content_browser_test_utils.h"
12 #include "content/public/test/test_utils.h" 15 #include "content/public/test/test_utils.h"
13 #include "content/shell/browser/shell.h" 16 #include "content/shell/browser/shell.h"
14 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
15 18
16 namespace content { 19 namespace content {
17 20
18 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) { 21 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 namespace { 54 namespace {
52 55
53 void CallbackChecker(bool* non_nested_task_ran) { 56 void CallbackChecker(bool* non_nested_task_ran) {
54 *non_nested_task_ran = true; 57 *non_nested_task_ran = true;
55 } 58 }
56 59
57 } // namespace 60 } // namespace
58 61
59 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) { 62 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) {
60 bool non_nested_task_ran = false; 63 bool non_nested_task_ran = false;
61 base::MessageLoop::current()->PostNonNestableTask( 64 base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
62 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran)); 65 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
63 content::RunAllPendingInMessageLoop(); 66 content::RunAllPendingInMessageLoop();
64 ASSERT_TRUE(non_nested_task_ran); 67 ASSERT_TRUE(non_nested_task_ran);
65 } 68 }
66 69
67 } // namespace content 70 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/test_video_frame_provider.cc ('k') | content/test/fake_compositor_dependencies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698