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

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

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/public/test/test_utils.h"
13 #include "content/shell/browser/shell.h" 13 #include "content/shell/browser/shell.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) { 18 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_ShouldntRun) {
19 // Ensures that tests with MANUAL_ prefix don't run automatically. 19 // Ensures that tests with MANUAL_ prefix don't run automatically.
20 ASSERT_TRUE(false); 20 ASSERT_TRUE(false);
21 } 21 }
22 22
23 class ContentBrowserTestSanityTest : public ContentBrowserTest { 23 class ContentBrowserTestSanityTest : public ContentBrowserTest {
24 public: 24 public:
25 void SetUpCommandLine(CommandLine* command_line) override { 25 void SetUpCommandLine(base::CommandLine* command_line) override {
26 const testing::TestInfo* const test_info = 26 const testing::TestInfo* const test_info =
27 testing::UnitTest::GetInstance()->current_test_info(); 27 testing::UnitTest::GetInstance()->current_test_info();
28 if (std::string(test_info->name()) == "SingleProcess") 28 if (std::string(test_info->name()) == "SingleProcess")
29 command_line->AppendSwitch(switches::kSingleProcess); 29 command_line->AppendSwitch(switches::kSingleProcess);
30 } 30 }
31 31
32 void Test() { 32 void Test() {
33 GURL url = GetTestUrl(".", "simple_page.html"); 33 GURL url = GetTestUrl(".", "simple_page.html");
34 34
35 base::string16 expected_title(base::ASCIIToUTF16("OK")); 35 base::string16 expected_title(base::ASCIIToUTF16("OK"));
(...skipping 22 matching lines...) Expand all
58 58
59 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) { 59 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, NonNestableTask) {
60 bool non_nested_task_ran = false; 60 bool non_nested_task_ran = false;
61 base::MessageLoop::current()->PostNonNestableTask( 61 base::MessageLoop::current()->PostNonNestableTask(
62 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran)); 62 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
63 content::RunAllPendingInMessageLoop(); 63 content::RunAllPendingInMessageLoop();
64 ASSERT_TRUE(non_nested_task_ran); 64 ASSERT_TRUE(non_nested_task_ran);
65 } 65 }
66 66
67 } // namespace content 67 } // namespace content
OLDNEW
« no previous file with comments | « content/test/browser_side_navigation_test_utils.cc ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698