| OLD | NEW |
| 1 // Copyright (c) 2011 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 "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/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 20 | 21 |
| 21 class LazyBackgroundPageApiTest : public ExtensionApiTest { | 22 class LazyBackgroundPageApiTest : public ExtensionApiTest { |
| 22 public: | 23 public: |
| 23 void SetUpCommandLine(CommandLine* command_line) { | 24 void SetUpCommandLine(CommandLine* command_line) { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // cause lazy background pages to be created. | 118 // cause lazy background pages to be created. |
| 118 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_)); | 119 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_)); |
| 119 EXPECT_EQ(num_page_actions, // should be + 1 | 120 EXPECT_EQ(num_page_actions, // should be + 1 |
| 120 browser()->window()->GetLocationBar()-> | 121 browser()->window()->GetLocationBar()-> |
| 121 GetLocationBarForTesting()->PageActionVisibleCount()); | 122 GetLocationBarForTesting()->PageActionVisibleCount()); |
| 122 } | 123 } |
| 123 | 124 |
| 124 // TODO: background page with timer. | 125 // TODO: background page with timer. |
| 125 // TODO: background page that interacts with popup. | 126 // TODO: background page that interacts with popup. |
| 126 // TODO: background page with menu. | 127 // TODO: background page with menu. |
| OLD | NEW |