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