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.h" | |
6 #include "chrome/browser/browser_list.h" | 5 #include "chrome/browser/browser_list.h" |
7 #include "chrome/browser/browser_window.h" | 6 #include "chrome/browser/browser_window.h" |
8 #include "chrome/browser/extensions/browser_action_test_util.h" | 7 #include "chrome/browser/extensions/browser_action_test_util.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.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/extensions_service.h" | |
12 #include "chrome/browser/extensions/user_script_master.h" | 11 #include "chrome/browser/extensions/user_script_master.h" |
13 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.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 |
23 // Loads a simple extension which attempts to change the title of every page | 23 // Loads a simple extension which attempts to change the title of every page |
24 // that loads to "modified". | 24 // that loads to "modified". |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 Browser* incognito_browser = BrowserList::FindBrowserWithType( | 195 Browser* incognito_browser = BrowserList::FindBrowserWithType( |
196 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, | 196 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, |
197 false); | 197 false); |
198 | 198 |
199 // Simulate the incognito's browser action being clicked. | 199 // Simulate the incognito's browser action being clicked. |
200 BrowserActionTestUtil(incognito_browser).Press(0); | 200 BrowserActionTestUtil(incognito_browser).Press(0); |
201 | 201 |
202 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 202 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
203 } | 203 } |
OLD | NEW |