| 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 "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.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/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_simple.html")) << | 91 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_simple.html")) << |
| 92 message_; | 92 message_; |
| 93 } | 93 } |
| 94 | 94 |
| 95 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestComplex) { | 95 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestComplex) { |
| 96 ASSERT_TRUE(StartEmbeddedTestServer()); | 96 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 97 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) << | 97 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) << |
| 98 message_; | 98 message_; |
| 99 } | 99 } |
| 100 | 100 |
| 101 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestTypes) { |
| 102 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 103 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_types.html")) << message_; |
| 104 } |
| 105 |
| 101 // Flaky (sometimes crash): http://crbug.com/140976 | 106 // Flaky (sometimes crash): http://crbug.com/140976 |
| 102 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | 107 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, |
| 103 DISABLED_WebRequestAuthRequired) { | 108 DISABLED_WebRequestAuthRequired) { |
| 104 CancelLoginDialog login_dialog_helper; | 109 CancelLoginDialog login_dialog_helper; |
| 105 | 110 |
| 106 ASSERT_TRUE(StartEmbeddedTestServer()); | 111 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 107 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_auth_required.html")) << | 112 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_auth_required.html")) << |
| 108 message_; | 113 message_; |
| 109 } | 114 } |
| 110 | 115 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 ExtensionTestMessageListener listener2("xmlhttprequest", false); | 419 ExtensionTestMessageListener listener2("xmlhttprequest", false); |
| 415 | 420 |
| 416 ASSERT_TRUE(LoadExtension( | 421 ASSERT_TRUE(LoadExtension( |
| 417 test_data_dir_.AppendASCII("webrequest_hosted_app"))); | 422 test_data_dir_.AppendASCII("webrequest_hosted_app"))); |
| 418 | 423 |
| 419 ui_test_utils::NavigateToURL(browser(), hosted_app_url); | 424 ui_test_utils::NavigateToURL(browser(), hosted_app_url); |
| 420 | 425 |
| 421 EXPECT_TRUE(listener1.WaitUntilSatisfied()); | 426 EXPECT_TRUE(listener1.WaitUntilSatisfied()); |
| 422 EXPECT_TRUE(listener2.WaitUntilSatisfied()); | 427 EXPECT_TRUE(listener2.WaitUntilSatisfied()); |
| 423 } | 428 } |
| OLD | NEW |