| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/extensions/autoupdate_interceptor.h" | 8 #include "chrome/browser/extensions/autoupdate_interceptor.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 GURL feed_url = test_server()->GetURL(kFeedPage); | 190 GURL feed_url = test_server()->GetURL(kFeedPage); |
| 191 ui_test_utils::NavigateToURL(browser(), feed_url); | 191 ui_test_utils::NavigateToURL(browser(), feed_url); |
| 192 ASSERT_TRUE(WaitForPageActionCountChangeTo(1)); | 192 ASSERT_TRUE(WaitForPageActionCountChangeTo(1)); |
| 193 | 193 |
| 194 UnloadExtension(last_loaded_extension_id_); | 194 UnloadExtension(last_loaded_extension_id_); |
| 195 | 195 |
| 196 // Make sure the page action goes away when it's unloaded. | 196 // Make sure the page action goes away when it's unloaded. |
| 197 ASSERT_TRUE(WaitForPageActionCountChangeTo(0)); | 197 ASSERT_TRUE(WaitForPageActionCountChangeTo(0)); |
| 198 } | 198 } |
| 199 | 199 |
| 200 // Flaky crash on Mac debug. http://crbug.com/45079 | |
| 201 #if defined(OS_MACOSX) | |
| 202 #define PageActionRefreshCrash PageActionRefreshCrash | |
| 203 #endif | |
| 204 // Tests that we can load page actions in the Omnibox. | 200 // Tests that we can load page actions in the Omnibox. |
| 205 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionRefreshCrash) { | 201 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionRefreshCrash) { |
| 206 base::TimeTicks start_time = base::TimeTicks::Now(); | 202 base::TimeTicks start_time = base::TimeTicks::Now(); |
| 207 | 203 |
| 208 ExtensionService* service = browser()->profile()->GetExtensionService(); | 204 ExtensionService* service = browser()->profile()->GetExtensionService(); |
| 209 | 205 |
| 210 size_t size_before = service->extensions()->size(); | 206 size_t size_before = service->extensions()->size(); |
| 211 | 207 |
| 212 FilePath base_path = test_data_dir_.AppendASCII("browsertest") | 208 FilePath base_path = test_data_dir_.AppendASCII("browsertest") |
| 213 .AppendASCII("crash_44415"); | 209 .AppendASCII("crash_44415"); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 | 826 |
| 831 EXPECT_EQ(extension->GetResourceURL("options.html"), | 827 EXPECT_EQ(extension->GetResourceURL("options.html"), |
| 832 tab_strip->GetTabContentsAt(1)->tab_contents()->GetURL()); | 828 tab_strip->GetTabContentsAt(1)->tab_contents()->GetURL()); |
| 833 } | 829 } |
| 834 | 830 |
| 835 //============================================================================== | 831 //============================================================================== |
| 836 // STOP! Please do not add any more random-ass tests here. Create new files for | 832 // STOP! Please do not add any more random-ass tests here. Create new files for |
| 837 // your tests grouped by functionality. Also, you should strongly consider using | 833 // your tests grouped by functionality. Also, you should strongly consider using |
| 838 // ExtensionAPITest if possible. | 834 // ExtensionAPITest if possible. |
| 839 //============================================================================== | 835 //============================================================================== |
| OLD | NEW |