OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 class StartupBrowserCreatorTest : public ExtensionBrowserTest { | 117 class StartupBrowserCreatorTest : public ExtensionBrowserTest { |
118 protected: | 118 protected: |
119 StartupBrowserCreatorTest() {} | 119 StartupBrowserCreatorTest() {} |
120 | 120 |
121 bool SetUpUserDataDirectory() override { | 121 bool SetUpUserDataDirectory() override { |
122 return ExtensionBrowserTest::SetUpUserDataDirectory(); | 122 return ExtensionBrowserTest::SetUpUserDataDirectory(); |
123 } | 123 } |
124 | 124 |
125 void SetUpCommandLine(base::CommandLine* command_line) override { | 125 void SetUpCommandLine(base::CommandLine* command_line) override { |
126 ExtensionBrowserTest::SetUpCommandLine(command_line); | 126 ExtensionBrowserTest::SetUpCommandLine(command_line); |
127 command_line->AppendSwitch(switches::kEnablePanels); | |
128 command_line->AppendSwitchASCII(switches::kHomePage, url::kAboutBlankURL); | 127 command_line->AppendSwitchASCII(switches::kHomePage, url::kAboutBlankURL); |
129 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
130 // TODO(nkostylev): Investigate if we can remove this switch. | 129 // TODO(nkostylev): Investigate if we can remove this switch. |
131 command_line->AppendSwitch(switches::kCreateBrowserOnStartupForTests); | 130 command_line->AppendSwitch(switches::kCreateBrowserOnStartupForTests); |
132 #endif | 131 #endif |
133 } | 132 } |
134 | 133 |
135 // Helper functions return void so that we can ASSERT*(). | 134 // Helper functions return void so that we can ASSERT*(). |
136 // Use ASSERT_NO_FATAL_FAILURE around calls to these functions to stop the | 135 // Use ASSERT_NO_FATAL_FAILURE around calls to these functions to stop the |
137 // test if an assert fails. | 136 // test if an assert fails. |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 ASSERT_TRUE(new_browser); | 1617 ASSERT_TRUE(new_browser); |
1619 | 1618 |
1620 // Verify that the first-run tab is shown and no other pages are present. | 1619 // Verify that the first-run tab is shown and no other pages are present. |
1621 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 1620 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
1622 ASSERT_EQ(1, tab_strip->count()); | 1621 ASSERT_EQ(1, tab_strip->count()); |
1623 EXPECT_EQ("title1.html", | 1622 EXPECT_EQ("title1.html", |
1624 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1623 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1625 } | 1624 } |
1626 | 1625 |
1627 #endif // !defined(OS_CHROMEOS) | 1626 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |