| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } | 160 } |
| 161 | 161 |
| 162 // Test that the webRequest events are dispatched with the expected details when | 162 // 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. | 163 // a frame or tab is removed while a response is being received. |
| 164 // Flaky: https://crbug.com/617865 |
| 164 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | 165 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, |
| 165 WebRequestUnloadAfterRequest) { | 166 DISABLED_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")) << |
| 170 message_; | 171 message_; |
| 171 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?3")) << | 172 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?3")) << |
| 172 message_; | 173 message_; |
| 173 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?4")) << | 174 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_unload.html?4")) << |
| 174 message_; | 175 message_; |
| 175 } | 176 } |
| (...skipping 402 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 |