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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 248 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
249 } | 249 } |
250 | 250 |
251 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestDeclarative1) { | 251 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestDeclarative1) { |
252 ASSERT_TRUE(StartEmbeddedTestServer()); | 252 ASSERT_TRUE(StartEmbeddedTestServer()); |
253 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_declarative1.html")) | 253 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_declarative1.html")) |
254 << message_; | 254 << message_; |
255 } | 255 } |
256 | 256 |
257 // This test times out on XP. See http://crbug.com/178296 | 257 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestDeclarative2) { |
258 #if defined(OS_WIN) | |
259 #define MAYBE_WebRequestDeclarative2 DISABLED_WebRequestDeclarative2 | |
260 #else | |
261 #define MAYBE_WebRequestDeclarative2 WebRequestDeclarative2 | |
262 #endif | |
263 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | |
264 MAYBE_WebRequestDeclarative2) { | |
265 ASSERT_TRUE(StartEmbeddedTestServer()); | 258 ASSERT_TRUE(StartEmbeddedTestServer()); |
266 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_declarative2.html")) | 259 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_declarative2.html")) |
267 << message_; | 260 << message_; |
268 } | 261 } |
269 | 262 |
270 void ExtensionWebRequestApiTest::RunPermissionTest( | 263 void ExtensionWebRequestApiTest::RunPermissionTest( |
271 const char* extension_directory, | 264 const char* extension_directory, |
272 bool load_extension_with_incognito_permission, | 265 bool load_extension_with_incognito_permission, |
273 bool wait_for_extension_loaded_in_incognito, | 266 bool wait_for_extension_loaded_in_incognito, |
274 const char* expected_content_regular_window, | 267 const char* expected_content_regular_window, |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 ASSERT_TRUE(granter); | 572 ASSERT_TRUE(granter); |
580 granter->RevokeForTesting(); | 573 granter->RevokeForTesting(); |
581 base::RunLoop().RunUntilIdle(); | 574 base::RunLoop().RunUntilIdle(); |
582 PerformXhrInPage(web_contents, kHost, port, kXhrPath); | 575 PerformXhrInPage(web_contents, kHost, port, kXhrPath); |
583 EXPECT_EQ(xhr_count, | 576 EXPECT_EQ(xhr_count, |
584 GetWebRequestCountFromBackgroundPage(extension, profile())); | 577 GetWebRequestCountFromBackgroundPage(extension, profile())); |
585 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); | 578 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); |
586 } | 579 } |
587 | 580 |
588 } // namespace extensions | 581 } // namespace extensions |
OLD | NEW |