| 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/extensions/api/permissions/permissions_api.h" | 6 #include "chrome/browser/extensions/api/permissions/permissions_api.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 ASSERT_TRUE(StartTestServer()); | 81 ASSERT_TRUE(StartTestServer()); |
| 82 ASSERT_TRUE(RunExtensionTest("content_scripts/view_source")) << message_; | 82 ASSERT_TRUE(RunExtensionTest("content_scripts/view_source")) << message_; |
| 83 } | 83 } |
| 84 | 84 |
| 85 // crbug.com/120762 | 85 // crbug.com/120762 |
| 86 IN_PROC_BROWSER_TEST_F( | 86 IN_PROC_BROWSER_TEST_F( |
| 87 ExtensionApiTest, | 87 ExtensionApiTest, |
| 88 DISABLED_ContentScriptStylesInjectedIntoExistingRenderers) { | 88 DISABLED_ContentScriptStylesInjectedIntoExistingRenderers) { |
| 89 ASSERT_TRUE(StartTestServer()); | 89 ASSERT_TRUE(StartTestServer()); |
| 90 | 90 |
| 91 ui_test_utils::WindowedNotificationObserver signal( | 91 content::WindowedNotificationObserver signal( |
| 92 chrome::NOTIFICATION_USER_SCRIPTS_UPDATED, | 92 chrome::NOTIFICATION_USER_SCRIPTS_UPDATED, |
| 93 content::Source<Profile>(browser()->profile())); | 93 content::Source<Profile>(browser()->profile())); |
| 94 | 94 |
| 95 // Start with a renderer already open at a URL. | 95 // Start with a renderer already open at a URL. |
| 96 GURL url(test_server()->GetURL("file/extensions/test_file.html")); | 96 GURL url(test_server()->GetURL("file/extensions/test_file.html")); |
| 97 ui_test_utils::NavigateToURL(browser(), url); | 97 ui_test_utils::NavigateToURL(browser(), url); |
| 98 | 98 |
| 99 LoadExtension( | 99 LoadExtension( |
| 100 test_data_dir_.AppendASCII("content_scripts/existing_renderers")); | 100 test_data_dir_.AppendASCII("content_scripts/existing_renderers")); |
| 101 | 101 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 EXPECT_TRUE(catcher.GetNextResult()); | 141 EXPECT_TRUE(catcher.GetNextResult()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptPermissionsApi) { | 144 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptPermissionsApi) { |
| 145 RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); | 145 RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); |
| 146 RequestPermissionsFunction::SetAutoConfirmForTests(true); | 146 RequestPermissionsFunction::SetAutoConfirmForTests(true); |
| 147 host_resolver()->AddRule("*.com", "127.0.0.1"); | 147 host_resolver()->AddRule("*.com", "127.0.0.1"); |
| 148 ASSERT_TRUE(StartTestServer()); | 148 ASSERT_TRUE(StartTestServer()); |
| 149 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_; | 149 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_; |
| 150 } | 150 } |
| OLD | NEW |