summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc13
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc2
-rw-r--r--chrome/test/in_process_browser_test.cc5
3 files changed, 16 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 3dcef8b..72ac2cd 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -68,8 +68,14 @@ bool ExtensionBrowserTest::InstallExtension(const FilePath& path) {
registrar_.Remove(this, NotificationType::EXTENSION_INSTALLED,
NotificationService::AllSources());
size_t num_after = service->extensions()->size();
- if (num_after != (num_before + 1))
+ if (num_after != (num_before + 1)) {
+ std::cout << "Num extensions before: " << IntToString(num_before)
+ << "num after: " << IntToString(num_after)
+ << "Installed extensions are:\n";
+ for (size_t i = 0; i < service->extensions()->size(); ++i)
+ std::cout << " " << service->extensions()->at(i)->id() << "\n";
return false;
+ }
return WaitForExtensionHostsToLoad();
}
@@ -89,8 +95,11 @@ bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
for (ExtensionProcessManager::const_iterator iter = manager->begin();
iter != manager->end(); ++iter) {
while (!(*iter)->did_stop_loading()) {
- if ((base::Time::Now() - start_time).InMilliseconds() > kTimeoutMs)
+ if ((base::Time::Now() - start_time).InMilliseconds() > kTimeoutMs) {
+ std::cout << "Extension host did not load for URL: "
+ << (*iter)->GetURL().spec();
return false;
+ }
MessageLoop::current()->PostDelayedTask(FROM_HERE,
new MessageLoop::QuitTask, 200);
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index af2f11a..b594477 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -76,7 +76,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Shelf) {
// Tests that installing and uninstalling extensions don't crash with an
// incognito window open.
// This test is disabled. see bug 16106.
-#if 0
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Incognito) {
// Open an incognito window to the extensions management page. We just
// want to make sure that we don't crash while playing with extensions when
@@ -87,7 +86,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Incognito) {
ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx")));
UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf");
}
-#endif
// Tests that we can load extension pages into the tab area and they can call
// extension APIs.
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index bbfdb64..292ae8e 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -124,6 +124,11 @@ void InProcessBrowserTest::SetUp() {
command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
subprocess_path);
+ // Enable warning level logging so that we can see when bad stuff happens.
+ command_line->AppendSwitch(switches::kEnableLogging);
+ command_line->AppendSwitchWithValue(switches::kLoggingLevel,
+ IntToWString(1)); // warning
+
SandboxInitWrapper sandbox_wrapper;
MainFunctionParams params(*command_line, sandbox_wrapper, NULL);
params.ui_task =