| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_list.h" | 5 #include "chrome/browser/browser_list.h" |
| 6 #include "chrome/browser/browser_window.h" | 6 #include "chrome/browser/browser_window.h" |
| 7 #include "chrome/browser/extensions/browser_action_test_util.h" | 7 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extensions_service.h" | 9 #include "chrome/browser/extensions/extensions_service.h" |
| 10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 11 #include "chrome/browser/extensions/user_script_master.h" | 11 #include "chrome/browser/extensions/user_script_master.h" |
| 12 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/ui_test_utils.h" | 17 #include "chrome/test/ui_test_utils.h" |
| 18 #include "net/base/mock_host_resolver.h" | 18 #include "net/base/mock_host_resolver.h" |
| 19 | 19 |
| 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoNoScript) { | 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoNoScript) { |
| 21 ASSERT_TRUE(StartTestServer()); | 21 ASSERT_TRUE(StartTestServer()); |
| 22 | 22 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 Browser* incognito_browser = BrowserList::FindBrowserWithType( | 187 Browser* incognito_browser = BrowserList::FindBrowserWithType( |
| 188 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, | 188 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, |
| 189 false); | 189 false); |
| 190 | 190 |
| 191 // Simulate the incognito's browser action being clicked. | 191 // Simulate the incognito's browser action being clicked. |
| 192 BrowserActionTestUtil(incognito_browser).Press(0); | 192 BrowserActionTestUtil(incognito_browser).Press(0); |
| 193 | 193 |
| 194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 195 } | 195 } |
| OLD | NEW |