OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 test_server()->GetURL("files/extensions/test_file.html")); | 103 test_server()->GetURL("files/extensions/test_file.html")); |
104 | 104 |
105 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ | 105 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ |
106 .AppendASCII("incognito").AppendASCII("apis"))); | 106 .AppendASCII("incognito").AppendASCII("apis"))); |
107 | 107 |
108 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 108 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
109 } | 109 } |
110 | 110 |
111 // Tests that the APIs in an incognito-enabled split-mode extension work | 111 // Tests that the APIs in an incognito-enabled split-mode extension work |
112 // properly. | 112 // properly. |
| 113 #if defined(OS_WIN) |
| 114 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_IncognitoSplitMode) { |
| 115 #else |
113 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoSplitMode) { | 116 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoSplitMode) { |
| 117 #endif |
114 host_resolver()->AddRule("*", "127.0.0.1"); | 118 host_resolver()->AddRule("*", "127.0.0.1"); |
115 ASSERT_TRUE(StartTestServer()); | 119 ASSERT_TRUE(StartTestServer()); |
116 | 120 |
117 // We need 2 ResultCatchers because we'll be running the same test in both | 121 // We need 2 ResultCatchers because we'll be running the same test in both |
118 // regular and incognito mode. | 122 // regular and incognito mode. |
119 ResultCatcher catcher; | 123 ResultCatcher catcher; |
120 catcher.RestrictToProfile(browser()->profile()); | 124 catcher.RestrictToProfile(browser()->profile()); |
121 ResultCatcher catcher_incognito; | 125 ResultCatcher catcher_incognito; |
122 catcher_incognito.RestrictToProfile( | 126 catcher_incognito.RestrictToProfile( |
123 browser()->profile()->GetOffTheRecordProfile()); | 127 browser()->profile()->GetOffTheRecordProfile()); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 test_server()->GetURL("files/extensions/test_file.html")); | 188 test_server()->GetURL("files/extensions/test_file.html")); |
185 | 189 |
186 Browser* incognito_browser = BrowserList::FindTabbedBrowser( | 190 Browser* incognito_browser = BrowserList::FindTabbedBrowser( |
187 browser()->profile()->GetOffTheRecordProfile(), false); | 191 browser()->profile()->GetOffTheRecordProfile(), false); |
188 | 192 |
189 // Simulate the incognito's browser action being clicked. | 193 // Simulate the incognito's browser action being clicked. |
190 BrowserActionTestUtil(incognito_browser).Press(0); | 194 BrowserActionTestUtil(incognito_browser).Press(0); |
191 | 195 |
192 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 196 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
193 } | 197 } |
OLD | NEW |