| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "chrome/browser/extensions/extension_action.h" | 10 #include "chrome/browser/extensions/extension_action.h" |
| 11 #include "chrome/browser/extensions/extension_action_manager.h" | 11 #include "chrome/browser/extensions/extension_action_manager.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/page_action_controller.h" | 13 #include "chrome/browser/extensions/page_action_controller.h" |
| 14 #include "chrome/browser/extensions/tab_helper.h" | 14 #include "chrome/browser/extensions/tab_helper.h" |
| 15 #include "chrome/browser/extensions/test_extension_system.h" | 15 #include "chrome/browser/extensions/test_extension_system.h" |
| 16 #include "chrome/browser/sessions/session_id.h" | 16 #include "chrome/browser/sessions/session_tab_helper.h" |
| 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 18 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
| 19 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
| 20 #include "extensions/common/extension_builder.h" | 20 #include "extensions/common/extension_builder.h" |
| 21 #include "extensions/common/value_builder.h" | 21 #include "extensions/common/value_builder.h" |
| 22 | 22 |
| 23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 24 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" | 24 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" |
| 25 #include "chrome/browser/chromeos/settings/cros_settings.h" | 25 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 26 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 26 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void TearDown() OVERRIDE { | 50 virtual void TearDown() OVERRIDE { |
| 51 #if defined OS_CHROMEOS | 51 #if defined OS_CHROMEOS |
| 52 test_user_manager_.reset(); | 52 test_user_manager_.reset(); |
| 53 #endif | 53 #endif |
| 54 ChromeRenderViewHostTestHarness::TearDown(); | 54 ChromeRenderViewHostTestHarness::TearDown(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 int tab_id() { | 57 int tab_id() { |
| 58 return SessionID::IdForTab(web_contents()); | 58 return SessionTabHelper::IdForTab(web_contents()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 ExtensionService* extension_service_; | 61 ExtensionService* extension_service_; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 #if defined OS_CHROMEOS | 64 #if defined OS_CHROMEOS |
| 65 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 65 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| 66 chromeos::ScopedTestCrosSettings test_cros_settings_; | 66 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 67 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; | 67 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; |
| 68 #endif | 68 #endif |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Should discard the settings, and go back to the defaults. | 104 // Should discard the settings, and go back to the defaults. |
| 105 NavigateAndCommit(GURL("http://www.yahoo.com")); | 105 NavigateAndCommit(GURL("http://www.yahoo.com")); |
| 106 | 106 |
| 107 EXPECT_EQ("Hello", page_action.GetTitle(tab_id())); | 107 EXPECT_EQ("Hello", page_action.GetTitle(tab_id())); |
| 108 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id())); | 108 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id())); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace | 111 } // namespace |
| 112 } // namespace extensions | 112 } // namespace extensions |
| OLD | NEW |