summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_incognito_apitest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_incognito_apitest.cc')
-rw-r--r--chrome/browser/extensions/extension_incognito_apitest.cc62
1 files changed, 27 insertions, 35 deletions
diff --git a/chrome/browser/extensions/extension_incognito_apitest.cc b/chrome/browser/extensions/extension_incognito_apitest.cc
index abe5267..640fa14 100644
--- a/chrome/browser/extensions/extension_incognito_apitest.cc
+++ b/chrome/browser/extensions/extension_incognito_apitest.cc
@@ -108,45 +108,37 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Incognito) {
// Tests that the APIs in an incognito-enabled split-mode extension work
// properly.
// TODO(mpcomplete): Crashes flakily. http://crbug.com/53991
+extern bool g_log_bug53991;
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_IncognitoSplitMode) {
+ g_log_bug53991 = true;
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
- {
- // We need 2 ResultCatchers because we'll be running the same test in both
- // regular and incognito mode.
- ResultCatcher catcher;
- catcher.RestrictToProfile(browser()->profile());
- ResultCatcher catcher_incognito;
- catcher_incognito.RestrictToProfile(
- browser()->profile()->GetOffTheRecordProfile());
-
- // Open incognito window and navigate to test page.
- ui_test_utils::OpenURLOffTheRecord(browser()->profile(),
- GURL("http://www.example.com:1337/files/extensions/test_file.html"));
-
- LOG(INFO) << "DEBUG: Loading extension";
-
- ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_.
- AppendASCII("incognito").AppendASCII("split")));
-
- LOG(INFO) << "DEBUG: waiting for message";
-
- // Wait for both extensions to be ready before telling them to proceed.
- ExtensionTestMessageListener listener("waiting", true);
- EXPECT_TRUE(listener.WaitUntilSatisfied());
- ExtensionTestMessageListener listener_incognito("waiting", true);
- EXPECT_TRUE(listener_incognito.WaitUntilSatisfied());
- listener.Reply("go");
- listener_incognito.Reply("go");
-
- LOG(INFO) << "DEBUG: Get result for normal";
- EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
- LOG(INFO) << "DEBUG: Get result for incognito";
- EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message();
- LOG(INFO) << "DEBUG: Got results";
- }
- LOG(INFO) << "DEBUG: ResultCatcher destroyed.";
+ // We need 2 ResultCatchers because we'll be running the same test in both
+ // regular and incognito mode.
+ ResultCatcher catcher;
+ catcher.RestrictToProfile(browser()->profile());
+ ResultCatcher catcher_incognito;
+ catcher_incognito.RestrictToProfile(
+ browser()->profile()->GetOffTheRecordProfile());
+
+ // Open incognito window and navigate to test page.
+ ui_test_utils::OpenURLOffTheRecord(browser()->profile(),
+ GURL("http://www.example.com:1337/files/extensions/test_file.html"));
+
+ ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_
+ .AppendASCII("incognito").AppendASCII("split")));
+
+ // Wait for both extensions to be ready before telling them to proceed.
+ ExtensionTestMessageListener listener("waiting", true);
+ EXPECT_TRUE(listener.WaitUntilSatisfied());
+ ExtensionTestMessageListener listener_incognito("waiting", true);
+ EXPECT_TRUE(listener_incognito.WaitUntilSatisfied());
+ listener.Reply("go");
+ listener_incognito.Reply("go");
+
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message();
}
// Tests that the APIs in an incognito-disabled extension don't see incognito