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" | 9 #include "chrome/browser/extensions/user_script_master.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 .AppendASCII("incognito").AppendASCII("apis_disabled"))); | 177 .AppendASCII("incognito").AppendASCII("apis_disabled"))); |
178 | 178 |
179 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 179 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
180 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), | 180 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), |
181 GURL("about:blank")); | 181 GURL("about:blank")); |
182 listener.Reply("created"); | 182 listener.Reply("created"); |
183 | 183 |
184 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 184 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
185 } | 185 } |
186 | 186 |
187 #if defined(OS_WIN) || defined(OS_MACOSX) | |
188 // http://crbug.com/104438. | |
189 #define MAYBE_IncognitoPopup DISABLED_IncognitoPopup | |
190 #else | |
191 #define MAYBE_IncognitoPopup IncognitoPopup | |
192 #endif | |
193 // Test that opening a popup from an incognito browser window works properly. | 187 // Test that opening a popup from an incognito browser window works properly. |
194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_IncognitoPopup) { | 188 // http://crbug.com/180759. |
| 189 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_IncognitoPopup) { |
195 host_resolver()->AddRule("*", "127.0.0.1"); | 190 host_resolver()->AddRule("*", "127.0.0.1"); |
196 ASSERT_TRUE(StartEmbeddedTestServer()); | 191 ASSERT_TRUE(StartEmbeddedTestServer()); |
197 | 192 |
198 ResultCatcher catcher; | 193 ResultCatcher catcher; |
199 | 194 |
200 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ | 195 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ |
201 .AppendASCII("incognito").AppendASCII("popup"))); | 196 .AppendASCII("incognito").AppendASCII("popup"))); |
202 | 197 |
203 // Open incognito window and navigate to test page. | 198 // Open incognito window and navigate to test page. |
204 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( | 199 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( |
205 browser()->profile(), | 200 browser()->profile(), |
206 embedded_test_server()->GetURL("/extensions/test_file.html")); | 201 embedded_test_server()->GetURL("/extensions/test_file.html")); |
207 | 202 |
208 // Simulate the incognito's browser action being clicked. | 203 // Simulate the incognito's browser action being clicked. |
209 BrowserActionTestUtil(incognito_browser).Press(0); | 204 BrowserActionTestUtil(incognito_browser).Press(0); |
210 | 205 |
211 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 206 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
212 } | 207 } |
OLD | NEW |