| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/ref_counted.h" | 5 #include "base/ref_counted.h" |
| 6 #include "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
| 7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 // There should now be two extension views and preferred height of the view | 143 // There should now be two extension views and preferred height of the view |
| 144 // should be non-zero. | 144 // should be non-zero. |
| 145 EXPECT_EQ(shelf->GetChildViewCount(), 2); | 145 EXPECT_EQ(shelf->GetChildViewCount(), 2); |
| 146 EXPECT_NE(shelf->GetPreferredSize().height(), 0); | 146 EXPECT_NE(shelf->GetPreferredSize().height(), 0); |
| 147 } | 147 } |
| 148 #endif // defined(OS_WIN) | 148 #endif // defined(OS_WIN) |
| 149 | 149 |
| 150 // Tests that installing and uninstalling extensions don't crash with an | 150 // Tests that installing and uninstalling extensions don't crash with an |
| 151 // incognito window open. | 151 // incognito window open. |
| 152 // This test is disabled. see bug 16106. | |
| 153 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Incognito) { | 152 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Incognito) { |
| 154 // Open an incognito window to the extensions management page. We just | 153 // Open an incognito window to the extensions management page. We just |
| 155 // want to make sure that we don't crash while playing with extensions when | 154 // want to make sure that we don't crash while playing with extensions when |
| 156 // this guy is around. | 155 // this guy is around. |
| 157 Browser::OpenURLOffTheRecord(browser()->profile(), | 156 Browser::OpenURLOffTheRecord(browser()->profile(), |
| 158 GURL(chrome::kChromeUIExtensionsURL)); | 157 GURL(chrome::kChromeUIExtensionsURL)); |
| 159 | 158 |
| 160 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 1)); | 159 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 1)); |
| 161 UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf"); | 160 UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf"); |
| 162 } | 161 } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 481 |
| 483 ExtensionsService* service = browser()->profile()->GetExtensionsService(); | 482 ExtensionsService* service = browser()->profile()->GetExtensionsService(); |
| 484 EXPECT_EQ(0u, service->extensions()->size()); | 483 EXPECT_EQ(0u, service->extensions()->size()); |
| 485 ASSERT_EQ(1u, service->disabled_extensions()->size()); | 484 ASSERT_EQ(1u, service->disabled_extensions()->size()); |
| 486 | 485 |
| 487 // Now try uninstalling it. | 486 // Now try uninstalling it. |
| 488 UninstallExtension(service->disabled_extensions()->at(0)->id()); | 487 UninstallExtension(service->disabled_extensions()->at(0)->id()); |
| 489 EXPECT_EQ(0u, service->extensions()->size()); | 488 EXPECT_EQ(0u, service->extensions()->size()); |
| 490 EXPECT_EQ(0u, service->disabled_extensions()->size()); | 489 EXPECT_EQ(0u, service->disabled_extensions()->size()); |
| 491 } | 490 } |
| OLD | NEW |