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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
7 #include "base/threading/platform_thread.h" | 7 #include "base/threading/platform_thread.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/automation/automation_util.h" | 10 #include "chrome/browser/automation/automation_util.h" |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 restart_listener.WaitUntilSatisfied(); | 706 restart_listener.WaitUntilSatisfied(); |
707 } | 707 } |
708 | 708 |
709 // Tests that relaunching an app with devtools open reopens devtools. | 709 // Tests that relaunching an app with devtools open reopens devtools. |
710 #ifdef NDEBUG | 710 #ifdef NDEBUG |
711 #define MAYBE_DevToolsOpenedWithReload DevToolsOpenedWithReload | 711 #define MAYBE_DevToolsOpenedWithReload DevToolsOpenedWithReload |
712 #else | 712 #else |
713 // This is currently expected to fail in debug builds due to a segfault in | 713 // This is currently expected to fail in debug builds due to a segfault in |
714 // WebKit triggered by a dereference between #ifndef NDEBUG guards see | 714 // WebKit triggered by a dereference between #ifndef NDEBUG guards see |
715 // http://crbug.com/157097 . | 715 // http://crbug.com/157097 . |
716 #define MAYBE_DevToolsOpenedWithReload FAILS_DevToolsOpenedWithReload | 716 // The test is disabled because of timeouts, see http://crbug.com/158283. |
| 717 #define MAYBE_DevToolsOpenedWithReload DISABLED_DevToolsOpenedWithReload |
717 #endif | 718 #endif |
718 | 719 |
719 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_DevToolsOpenedWithReload) { | 720 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_DevToolsOpenedWithReload) { |
720 using content::DevToolsAgentHostRegistry; | 721 using content::DevToolsAgentHostRegistry; |
721 | 722 |
722 ExtensionTestMessageListener launched_listener("Launched", false); | 723 ExtensionTestMessageListener launched_listener("Launched", false); |
723 const Extension* extension = LoadAndLaunchPlatformApp("minimal_id"); | 724 const Extension* extension = LoadAndLaunchPlatformApp("minimal_id"); |
724 ASSERT_TRUE(extension); | 725 ASSERT_TRUE(extension); |
725 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 726 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
726 ShellWindow* window = GetFirstShellWindow(); | 727 ShellWindow* window = GetFirstShellWindow(); |
(...skipping 26 matching lines...) Expand all Loading... |
753 window = GetFirstShellWindow(); | 754 window = GetFirstShellWindow(); |
754 ASSERT_TRUE(window); | 755 ASSERT_TRUE(window); |
755 | 756 |
756 // DevTools should have reopened with the relaunch. | 757 // DevTools should have reopened with the relaunch. |
757 rvh = window->web_contents()->GetRenderViewHost(); | 758 rvh = window->web_contents()->GetRenderViewHost(); |
758 ASSERT_TRUE(rvh); | 759 ASSERT_TRUE(rvh); |
759 ASSERT_TRUE(DevToolsAgentHostRegistry::HasDevToolsAgentHost(rvh)); | 760 ASSERT_TRUE(DevToolsAgentHostRegistry::HasDevToolsAgentHost(rvh)); |
760 } | 761 } |
761 | 762 |
762 } // namespace extensions | 763 } // namespace extensions |
OLD | NEW |