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
3 // found in the LICENSE file.
5 #include "content/public/test/content_browser_test.h"
7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h"
11 #include "content/public/test/content_browser_test_utils.h"
12 #include "content/shell/browser/shell.h"
13 #include "testing/gtest/include/gtest/gtest.h"
17 IN_PROC_BROWSER_TEST_F(ContentBrowserTest
, MANUAL_ShouldntRun
) {
18 // Ensures that tests with MANUAL_ prefix don't run automatically.
22 class ContentBrowserTestSanityTest
: public ContentBrowserTest
{
24 void SetUpCommandLine(CommandLine
* command_line
) override
{
25 const testing::TestInfo
* const test_info
=
26 testing::UnitTest::GetInstance()->current_test_info();
27 if (std::string(test_info
->name()) == "SingleProcess")
28 command_line
->AppendSwitch(switches::kSingleProcess
);
32 GURL url
= GetTestUrl(".", "simple_page.html");
34 base::string16
expected_title(base::ASCIIToUTF16("OK"));
35 TitleWatcher
title_watcher(shell()->web_contents(), expected_title
);
36 NavigateToURL(shell(), url
);
37 base::string16 title
= title_watcher
.WaitAndGetTitle();
38 EXPECT_EQ(expected_title
, title
);
42 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest
, Basic
) {
46 IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest
, SingleProcess
) {
50 } // namespace content