| 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 "chrome/browser/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/extension_test_message_listener.h" | |
| 9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 13 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
| 15 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 #include "extensions/test/extension_test_message_listener.h" |
| 17 #include "extensions/test/result_catcher.h" | 17 #include "extensions/test/result_catcher.h" |
| 18 #include "net/dns/mock_host_resolver.h" | 18 #include "net/dns/mock_host_resolver.h" |
| 19 #include "net/test/embedded_test_server/embedded_test_server.h" | 19 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 20 | 20 |
| 21 using content::WebContents; | 21 using content::WebContents; |
| 22 using extensions::ResultCatcher; | 22 using extensions::ResultCatcher; |
| 23 | 23 |
| 24 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoNoScript) { | 24 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoNoScript) { |
| 25 ASSERT_TRUE(StartEmbeddedTestServer()); | 25 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 26 | 26 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // Open incognito window and navigate to test page. | 199 // Open incognito window and navigate to test page. |
| 200 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( | 200 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( |
| 201 browser()->profile(), | 201 browser()->profile(), |
| 202 embedded_test_server()->GetURL("/extensions/test_file.html")); | 202 embedded_test_server()->GetURL("/extensions/test_file.html")); |
| 203 | 203 |
| 204 // Simulate the incognito's browser action being clicked. | 204 // Simulate the incognito's browser action being clicked. |
| 205 BrowserActionTestUtil(incognito_browser).Press(0); | 205 BrowserActionTestUtil(incognito_browser).Press(0); |
| 206 | 206 |
| 207 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 207 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 208 } | 208 } |
| OLD | NEW |