Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: chrome/browser/extensions/extension_incognito_apitest.cc

Issue 4667009: Mark ExtensionAPITest.Incognito as FLAKY for ChromiumOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/browser_list.h" 6 #include "chrome/browser/browser_list.h"
7 #include "chrome/browser/browser_window.h" 7 #include "chrome/browser/browser_window.h"
8 #include "chrome/browser/extensions/browser_action_test_util.h" 8 #include "chrome/browser/extensions/browser_action_test_util.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // Tests that an extension which is enabled for incognito mode doesn't 85 // Tests that an extension which is enabled for incognito mode doesn't
86 // accidentially create and incognito profile. 86 // accidentially create and incognito profile.
87 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DontCreateIncognitoProfile) { 87 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DontCreateIncognitoProfile) {
88 ASSERT_FALSE(browser()->profile()->HasOffTheRecordProfile()); 88 ASSERT_FALSE(browser()->profile()->HasOffTheRecordProfile());
89 ASSERT_TRUE( 89 ASSERT_TRUE(
90 RunExtensionTestIncognito("incognito/enumerate_tabs")) << message_; 90 RunExtensionTestIncognito("incognito/enumerate_tabs")) << message_;
91 ASSERT_FALSE(browser()->profile()->HasOffTheRecordProfile()); 91 ASSERT_FALSE(browser()->profile()->HasOffTheRecordProfile());
92 } 92 }
93 93
94 // TODO(kochi): Flaky at r65757 and after on buildbot for ChromiumOS.
95 // http://crosbug.com/9049
96 #if defined(OS_CHROMEOS)
97 #define MAYBE_Incognito FLAKY_Incognito
98 #else
99 #define MAYBE_Incognito Incognito
100 #endif
101
94 // Tests that the APIs in an incognito-enabled extension work properly. 102 // Tests that the APIs in an incognito-enabled extension work properly.
95 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Incognito) { 103 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Incognito) {
96 host_resolver()->AddRule("*", "127.0.0.1"); 104 host_resolver()->AddRule("*", "127.0.0.1");
97 ASSERT_TRUE(StartTestServer()); 105 ASSERT_TRUE(StartTestServer());
98 106
99 ResultCatcher catcher; 107 ResultCatcher catcher;
100 108
101 // Open incognito window and navigate to test page. 109 // Open incognito window and navigate to test page.
102 ui_test_utils::OpenURLOffTheRecord( 110 ui_test_utils::OpenURLOffTheRecord(
103 browser()->profile(), 111 browser()->profile(),
104 test_server()->GetURL("files/extensions/test_file.html")); 112 test_server()->GetURL("files/extensions/test_file.html"));
105 113
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 194
187 Browser* incognito_browser = BrowserList::FindBrowserWithType( 195 Browser* incognito_browser = BrowserList::FindBrowserWithType(
188 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, 196 browser()->profile()->GetOffTheRecordProfile(), Browser::TYPE_NORMAL,
189 false); 197 false);
190 198
191 // Simulate the incognito's browser action being clicked. 199 // Simulate the incognito's browser action being clicked.
192 BrowserActionTestUtil(incognito_browser).Press(0); 200 BrowserActionTestUtil(incognito_browser).Press(0);
193 201
194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 202 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
195 } 203 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698