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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 24 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
29 #include "chrome/test/base/in_process_browser_test.h" | 29 #include "chrome/test/base/in_process_browser_test.h" |
30 #include "chrome/test/base/ui_test_utils.h" | 30 #include "chrome/test/base/ui_test_utils.h" |
31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
| 34 using extensions::Extension; |
| 35 |
34 class StartupBrowserCreatorTest : public ExtensionBrowserTest { | 36 class StartupBrowserCreatorTest : public ExtensionBrowserTest { |
35 protected: | 37 protected: |
36 virtual bool SetUpUserDataDirectory() OVERRIDE { | 38 virtual bool SetUpUserDataDirectory() OVERRIDE { |
37 // Make sure the first run sentinel file exists before running these tests, | 39 // Make sure the first run sentinel file exists before running these tests, |
38 // since some of them customize the session startup pref whose value can | 40 // since some of them customize the session startup pref whose value can |
39 // be different than the default during the first run. | 41 // be different than the default during the first run. |
40 // TODO(bauerb): set the first run flag instead of creating a sentinel file. | 42 // TODO(bauerb): set the first run flag instead of creating a sentinel file. |
41 first_run::CreateSentinel(); | 43 first_run::CreateSentinel(); |
42 return ExtensionBrowserTest::SetUpUserDataDirectory(); | 44 return ExtensionBrowserTest::SetUpUserDataDirectory(); |
43 } | 45 } |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 ASSERT_EQ(1u, browser::GetBrowserCount(profile_urls)); | 684 ASSERT_EQ(1u, browser::GetBrowserCount(profile_urls)); |
683 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); | 685 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); |
684 ASSERT_TRUE(new_browser); | 686 ASSERT_TRUE(new_browser); |
685 ASSERT_EQ(1, new_browser->tab_count()); | 687 ASSERT_EQ(1, new_browser->tab_count()); |
686 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), | 688 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
687 new_browser->GetWebContentsAt(0)->GetURL()); | 689 new_browser->GetWebContentsAt(0)->GetURL()); |
688 EXPECT_EQ(1U, new_browser->GetTabContentsWrapperAt(0)->infobar_tab_helper()-> | 690 EXPECT_EQ(1U, new_browser->GetTabContentsWrapperAt(0)->infobar_tab_helper()-> |
689 infobar_count()); | 691 infobar_count()); |
690 } | 692 } |
691 #endif // !OS_CHROMEOS | 693 #endif // !OS_CHROMEOS |
OLD | NEW |