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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 | 150 |
151 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestComplex) { | 151 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestComplex) { |
152 ASSERT_TRUE(StartEmbeddedTestServer()); | 152 ASSERT_TRUE(StartEmbeddedTestServer()); |
153 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) << | 153 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) << |
154 message_; | 154 message_; |
155 } | 155 } |
156 | 156 |
157 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestTypes) { | 157 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestTypes) { |
158 ASSERT_TRUE(StartEmbeddedTestServer()); | 158 ASSERT_TRUE(StartEmbeddedTestServer()); |
159 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_types.html")) << message_; | 159 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_types.html")) << message_; |
160 SetIgnoreCSPErrorMessages(true); | |
asargent_no_longer_on_chrome
2016/05/31 19:24:11
Please add a comment with a link to crbug.com/6161
| |
160 } | 161 } |
161 | 162 |
162 // Test that the webRequest events are dispatched with the expected details when | 163 // Test that the webRequest events are dispatched with the expected details when |
163 // a frame or tab is removed while a response is being received. | 164 // a frame or tab is removed while a response is being received. |
164 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | 165 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, |
165 WebRequestUnloadAfterRequest) { | 166 WebRequestUnloadAfterRequest) { |
166 ASSERT_TRUE(StartEmbeddedTestServer()); | 167 ASSERT_TRUE(StartEmbeddedTestServer()); |
167 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?1")) << | 168 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?1")) << |
168 message_; | 169 message_; |
169 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?2")) << | 170 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?2")) << |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 ASSERT_TRUE(granter); | 579 ASSERT_TRUE(granter); |
579 granter->RevokeForTesting(); | 580 granter->RevokeForTesting(); |
580 base::RunLoop().RunUntilIdle(); | 581 base::RunLoop().RunUntilIdle(); |
581 PerformXhrInPage(web_contents, kHost, port, kXhrPath); | 582 PerformXhrInPage(web_contents, kHost, port, kXhrPath); |
582 EXPECT_EQ(xhr_count, | 583 EXPECT_EQ(xhr_count, |
583 GetWebRequestCountFromBackgroundPage(extension, profile())); | 584 GetWebRequestCountFromBackgroundPage(extension, profile())); |
584 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); | 585 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); |
585 } | 586 } |
586 | 587 |
587 } // namespace extensions | 588 } // namespace extensions |
OLD | NEW |