| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
| 7 #include "chrome/browser/debugger/devtools_client_host.h" | 7 #include "chrome/browser/debugger/devtools_client_host.h" |
| 8 #include "chrome/browser/debugger/devtools_manager.h" | 8 #include "chrome/browser/debugger/devtools_manager.h" |
| 9 #include "chrome/browser/debugger/devtools_window.h" | 9 #include "chrome/browser/debugger/devtools_window.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | 10 #include "chrome/browser/renderer_host/render_view_host.h" |
| 11 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/common/notification_registrar.h" | 13 #include "chrome/common/notification_registrar.h" |
| 14 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
| 15 #include "chrome/test/in_process_browser_test.h" | 15 #include "chrome/test/in_process_browser_test.h" |
| 16 #include "chrome/test/ui_test_utils.h" | 16 #include "chrome/test/ui_test_utils.h" |
| 17 | 17 |
| 18 |
| 19 #if defined(OS_WIN) |
| 20 #define MAYBE_TestShowScriptsTab TestShowScriptsTab |
| 21 #define MAYBE_TestSetBreakpoint TestSetBreakpoint |
| 22 #elif defined(OS_LINUX) |
| 23 // http://crbug.com/19748 |
| 24 #define MAYBE_TestShowScriptsTab DISABLED_TestShowScriptsTab |
| 25 #define MAYBE_TestSetBreakpoint DISABLED_TestSetBreakpoint |
| 26 #endif |
| 27 |
| 18 namespace { | 28 namespace { |
| 19 | 29 |
| 20 // Used to block until a dev tools client window's browser is closed. | 30 // Used to block until a dev tools client window's browser is closed. |
| 21 class BrowserClosedObserver : public NotificationObserver { | 31 class BrowserClosedObserver : public NotificationObserver { |
| 22 public: | 32 public: |
| 23 BrowserClosedObserver(Browser* browser) { | 33 BrowserClosedObserver(Browser* browser) { |
| 24 registrar_.Add(this, NotificationType::BROWSER_CLOSED, | 34 registrar_.Add(this, NotificationType::BROWSER_CLOSED, |
| 25 Source<Browser>(browser)); | 35 Source<Browser>(browser)); |
| 26 ui_test_utils::RunMessageLoop(); | 36 ui_test_utils::RunMessageLoop(); |
| 27 } | 37 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 155 } |
| 146 | 156 |
| 147 // Tests profiler panel. | 157 // Tests profiler panel. |
| 148 // http://crbug.com/16767 | 158 // http://crbug.com/16767 |
| 149 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { | 159 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { |
| 150 RunTest("testProfilerTab", kJsPage); | 160 RunTest("testProfilerTab", kJsPage); |
| 151 } | 161 } |
| 152 | 162 |
| 153 // Tests scripts panel showing. | 163 // Tests scripts panel showing. |
| 154 // http://crbug.com/16767 | 164 // http://crbug.com/16767 |
| 155 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { | 165 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestShowScriptsTab) { |
| 156 RunTest("testShowScriptsTab", kDebuggerTestPage); | 166 RunTest("testShowScriptsTab", kDebuggerTestPage); |
| 157 } | 167 } |
| 158 | 168 |
| 159 // Tests set breakpoint. | 169 // Tests set breakpoint. |
| 160 // http://crbug.com/16767 | 170 // http://crbug.com/16767 |
| 161 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestSetBreakpoint) { | 171 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestSetBreakpoint) { |
| 162 RunTest("testSetBreakpoint", kDebuggerTestPage); | 172 RunTest("testSetBreakpoint", kDebuggerTestPage); |
| 163 } | 173 } |
| 164 | 174 |
| 165 // Tests that 'Pause' button works for eval. | 175 // Tests that 'Pause' button works for eval. |
| 166 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) { | 176 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) { |
| 167 RunTest("testPauseInEval", kDebuggerTestPage); | 177 RunTest("testPauseInEval", kDebuggerTestPage); |
| 168 } | 178 } |
| 169 | 179 |
| 170 // Tests console eval. | 180 // Tests console eval. |
| 171 // DISABLED: See http://crbug.com/18786 | 181 // DISABLED: See http://crbug.com/18786 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 183 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalGlobal) { | 193 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalGlobal) { |
| 184 RunTest("testEvalGlobal", kEvalTestPage); | 194 RunTest("testEvalGlobal", kEvalTestPage); |
| 185 } | 195 } |
| 186 | 196 |
| 187 // Tests eval on call frame. | 197 // Tests eval on call frame. |
| 188 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalCallFrame) { | 198 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalCallFrame) { |
| 189 RunTest("testEvalCallFrame", kEvalTestPage); | 199 RunTest("testEvalCallFrame", kEvalTestPage); |
| 190 } | 200 } |
| 191 | 201 |
| 192 } // namespace | 202 } // namespace |
| OLD | NEW |