| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 other_browser = *it; | 83 other_browser = *it; |
| 84 } | 84 } |
| 85 return other_browser; | 85 return other_browser; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace | 88 } // namespace |
| 89 | 89 |
| 90 class StartupBrowserCreatorTest : public ExtensionBrowserTest { | 90 class StartupBrowserCreatorTest : public ExtensionBrowserTest { |
| 91 protected: | 91 protected: |
| 92 virtual bool SetUpUserDataDirectory() OVERRIDE { | 92 virtual bool SetUpUserDataDirectory() OVERRIDE { |
| 93 // Make sure the first run sentinel file exists before running these tests, | |
| 94 // since some of them customize the session startup pref whose value can | |
| 95 // be different than the default during the first run. | |
| 96 // TODO(bauerb): set the first run flag instead of creating a sentinel file. | |
| 97 first_run::CreateSentinel(); | |
| 98 return ExtensionBrowserTest::SetUpUserDataDirectory(); | 93 return ExtensionBrowserTest::SetUpUserDataDirectory(); |
| 99 } | 94 } |
| 100 | 95 |
| 101 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 96 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 102 ExtensionBrowserTest::SetUpCommandLine(command_line); | 97 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 103 command_line->AppendSwitch(switches::kEnablePanels); | 98 command_line->AppendSwitch(switches::kEnablePanels); |
| 104 command_line->AppendSwitchASCII(switches::kHomePage, | 99 command_line->AppendSwitchASCII(switches::kHomePage, |
| 105 content::kAboutBlankURL); | 100 content::kAboutBlankURL); |
| 106 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
| 107 // TODO(nkostylev): Investigate if we can remove this switch. | 102 // TODO(nkostylev): Investigate if we can remove this switch. |
| (...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 ASSERT_EQ(1, tab_strip->count()); | 1372 ASSERT_EQ(1, tab_strip->count()); |
| 1378 EXPECT_EQ("title1.html", | 1373 EXPECT_EQ("title1.html", |
| 1379 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1374 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
| 1380 } | 1375 } |
| 1381 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1376 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
| 1382 | 1377 |
| 1383 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1378 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
| 1384 // defined(ENABLE_CONFIGURATION_POLICY) | 1379 // defined(ENABLE_CONFIGURATION_POLICY) |
| 1385 | 1380 |
| 1386 #endif // !defined(OS_CHROMEOS) | 1381 #endif // !defined(OS_CHROMEOS) |
| OLD | NEW |