| 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" | 8 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 9 #include "chrome/browser/extensions/user_script_master.h" | |
| 10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 15 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
| 16 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 17 #include "content/public/test/browser_test_utils.h" | 16 #include "content/public/test/browser_test_utils.h" |
| 18 #include "net/dns/mock_host_resolver.h" | 17 #include "net/dns/mock_host_resolver.h" |
| 19 #include "net/test/embedded_test_server/embedded_test_server.h" | 18 #include "net/test/embedded_test_server/embedded_test_server.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Open incognito window and navigate to test page. | 197 // Open incognito window and navigate to test page. |
| 199 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( | 198 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( |
| 200 browser()->profile(), | 199 browser()->profile(), |
| 201 embedded_test_server()->GetURL("/extensions/test_file.html")); | 200 embedded_test_server()->GetURL("/extensions/test_file.html")); |
| 202 | 201 |
| 203 // Simulate the incognito's browser action being clicked. | 202 // Simulate the incognito's browser action being clicked. |
| 204 BrowserActionTestUtil(incognito_browser).Press(0); | 203 BrowserActionTestUtil(incognito_browser).Press(0); |
| 205 | 204 |
| 206 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 205 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 207 } | 206 } |
| OLD | NEW |