| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "chrome/browser/extensions/browser_action_test_util.h" | 7 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/omnibox/location_bar.h" | 13 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 14 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 18 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 19 | 20 |
| 20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
| 21 | 22 |
| 22 class LazyBackgroundPageApiTest : public ExtensionApiTest { | 23 class LazyBackgroundPageApiTest : public ExtensionApiTest { |
| 23 public: | 24 public: |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // cause lazy background pages to be created. | 119 // cause lazy background pages to be created. |
| 119 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_)); | 120 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_)); |
| 120 EXPECT_EQ(num_page_actions, // should be + 1 | 121 EXPECT_EQ(num_page_actions, // should be + 1 |
| 121 browser()->window()->GetLocationBar()-> | 122 browser()->window()->GetLocationBar()-> |
| 122 GetLocationBarForTesting()->PageActionVisibleCount()); | 123 GetLocationBarForTesting()->PageActionVisibleCount()); |
| 123 } | 124 } |
| 124 | 125 |
| 125 // TODO: background page with timer. | 126 // TODO: background page with timer. |
| 126 // TODO: background page that interacts with popup. | 127 // TODO: background page that interacts with popup. |
| 127 // TODO: background page with menu. | 128 // TODO: background page with menu. |
| OLD | NEW |