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

Side by Side Diff: chrome/browser/debugger/devtools_sanity_unittest.cc

Issue 6295010: DevTools: re-enable devtools tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed obsolete test data. Created 9 years, 11 months 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 | chrome/test/data/devtools/completion_on_pause.html » ('j') | 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/debugger/devtools_client_host.h" 9 #include "chrome/browser/debugger/devtools_client_host.h"
10 #include "chrome/browser/debugger/devtools_manager.h" 10 #include "chrome/browser/debugger/devtools_manager.h"
(...skipping 30 matching lines...) Expand all
41 41
42 private: 42 private:
43 NotificationRegistrar registrar_; 43 NotificationRegistrar registrar_;
44 DISALLOW_COPY_AND_ASSIGN(BrowserClosedObserver); 44 DISALLOW_COPY_AND_ASSIGN(BrowserClosedObserver);
45 }; 45 };
46 46
47 // The delay waited in some cases where we don't have a notifications for an 47 // The delay waited in some cases where we don't have a notifications for an
48 // action we take. 48 // action we take.
49 const int kActionDelayMs = 500; 49 const int kActionDelayMs = 500;
50 50
51 const char kConsoleTestPage[] = "files/devtools/console_test_page.html";
52 const char kDebuggerTestPage[] = "files/devtools/debugger_test_page.html"; 51 const char kDebuggerTestPage[] = "files/devtools/debugger_test_page.html";
53 const char kJsPage[] = "files/devtools/js_page.html";
54 const char kHeapProfilerPage[] = "files/devtools/heap_profiler.html"; 52 const char kHeapProfilerPage[] = "files/devtools/heap_profiler.html";
55 const char kPauseWhenLoadingDevTools[] = 53 const char kPauseWhenLoadingDevTools[] =
56 "files/devtools/pause_when_loading_devtools.html"; 54 "files/devtools/pause_when_loading_devtools.html";
57 const char kPauseWhenScriptIsRunning[] = 55 const char kPauseWhenScriptIsRunning[] =
58 "files/devtools/pause_when_script_is_running.html"; 56 "files/devtools/pause_when_script_is_running.html";
59 const char kResourceContentLengthTestPage[] = "files/devtools/image.html";
60 const char kResourceTestPage[] = "files/devtools/resource_test_page.html";
61 const char kSimplePage[] = "files/devtools/simple_page.html";
62 const char kCompletionOnPause[] =
63 "files/devtools/completion_on_pause.html";
64 const char kPageWithContentScript[] = 57 const char kPageWithContentScript[] =
65 "files/devtools/page_with_content_script.html"; 58 "files/devtools/page_with_content_script.html";
66 59
67 60
68 class DevToolsSanityTest : public InProcessBrowserTest { 61 class DevToolsSanityTest : public InProcessBrowserTest {
69 public: 62 public:
70 DevToolsSanityTest() { 63 DevToolsSanityTest() {
71 set_show_window(true); 64 set_show_window(true);
72 EnableDOMAutomation(); 65 EnableDOMAutomation();
73 } 66 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 break; 239 break;
247 default: 240 default:
248 NOTREACHED(); 241 NOTREACHED();
249 break; 242 break;
250 } 243 }
251 } 244 }
252 245
253 FilePath test_extensions_dir_; 246 FilePath test_extensions_dir_;
254 }; 247 };
255 248
256 // Fails after WebKit roll 69808:70011, http://crbug.com/59727.
257 #if defined(OS_LINUX) || defined(OS_WIN)
258 #define MAYBE_TestEnableResourcesTab DISABLED_TestEnableResourcesTab
259 #else
260 #define MAYBE_TestEnableResourcesTab TestEnableResourcesTab
261 #endif // defined(OS_LINUX) || defined(OS_WIN)
262
263 // Tests resources panel enabling.
264 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestEnableResourcesTab) {
265 RunTest("testEnableResourcesTab", kSimplePage);
266 }
267
268 // Fails after WebKit roll 59365:59477, http://crbug.com/44202.
269 #if defined(OS_LINUX)
270 #define MAYBE_TestResourceContentLength FLAKY_TestResourceContentLength
271 #else
272 #define MAYBE_TestResourceContentLength TestResourceContentLength
273 #endif // defined(OS_LINUX)
274
275 // Tests profiler panel.
276 // Disabled, http://crbug.com/68447.
277 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestProfilerTab) {
278 RunTest("testProfilerTab", kJsPage);
279 }
280
281 // Tests heap profiler. 249 // Tests heap profiler.
282 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestHeapProfiler) { 250 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestHeapProfiler) {
283 RunTest("testHeapProfiler", kHeapProfilerPage); 251 RunTest("testHeapProfiler", kHeapProfilerPage);
284 } 252 }
285 253
286 // Tests scripts panel showing. 254 // Tests scripts panel showing.
287 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { 255 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) {
288 RunTest("testShowScriptsTab", kDebuggerTestPage); 256 RunTest("testShowScriptsTab", kDebuggerTestPage);
289 } 257 }
290 258
291 // Fails after WebKit roll 75765:75812 (likely 75791), http://crbug.com/69719
292 #if defined(OS_LINUX) || defined(OS_WIN)
293 #define MAYBE_TestScriptsTabIsPopulatedOnInspectedPageRefresh \
294 FAILS_TestScriptsTabIsPopulatedOnInspectedPageRefresh
295 #else
296 #define MAYBE_TestScriptsTabIsPopulatedOnInspectedPageRefresh \
297 TestScriptsTabIsPopulatedOnInspectedPageRefresh
298 #endif // defined(OS_LINUX) || defined(OS_WIN)
299 // Tests that scripts tab is populated with inspected scripts even if it 259 // Tests that scripts tab is populated with inspected scripts even if it
300 // hadn't been shown by the moment inspected paged refreshed. 260 // hadn't been shown by the moment inspected paged refreshed.
301 // @see http://crbug.com/26312 261 // @see http://crbug.com/26312
302 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, 262 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest,
303 MAYBE_TestScriptsTabIsPopulatedOnInspectedPageRefresh) { 263 TestScriptsTabIsPopulatedOnInspectedPageRefresh) {
304 // Clear inspector settings to ensure that Elements will be 264 // Clear inspector settings to ensure that Elements will be
305 // current panel when DevTools window is open. 265 // current panel when DevTools window is open.
306 GetInspectedTab()->render_view_host()->delegate()->ClearInspectorSettings(); 266 GetInspectedTab()->render_view_host()->delegate()->ClearInspectorSettings();
307 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", 267 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh",
308 kDebuggerTestPage); 268 kDebuggerTestPage);
309 } 269 }
310 270
311 // Tests that a content script is in the scripts list. 271 // Tests that a content script is in the scripts list.
312 // This test is disabled, see bug 28961. 272 // This test is disabled, see bug 28961.
313 IN_PROC_BROWSER_TEST_F(DevToolsExtensionDebugTest, 273 IN_PROC_BROWSER_TEST_F(DevToolsExtensionDebugTest,
314 TestContentScriptIsPresent) { 274 TestContentScriptIsPresent) {
315 LoadExtension("simple_content_script"); 275 LoadExtension("simple_content_script");
316 RunTest("testContentScriptIsPresent", kPageWithContentScript); 276 RunTest("testContentScriptIsPresent", kPageWithContentScript);
317 } 277 }
318 278
319 // Tests that scripts are not duplicated after Scripts Panel switch. 279 // Tests that scripts are not duplicated after Scripts Panel switch.
320 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, 280 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest,
321 TestNoScriptDuplicatesOnPanelSwitch) { 281 TestNoScriptDuplicatesOnPanelSwitch) {
322 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage); 282 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage);
323 } 283 }
324 284
325 // Fails after WebKit roll 75765:75812 (likely 75791), http://crbug.com/69719
326 #if defined(OS_LINUX) || defined(OS_WIN)
327 #define MAYBE_TestPauseWhenLoadingDevTools DISABLED_TestPauseWhenLoadingDevTools
328 #else
329 #define MAYBE_TestPauseWhenLoadingDevTools TestPauseWhenLoadingDevTools
330 #endif // defined(OS_LINUX) || defined(OS_WIN)
331 // Tests that debugger works correctly if pause event occurs when DevTools 285 // Tests that debugger works correctly if pause event occurs when DevTools
332 // frontend is being loaded. 286 // frontend is being loaded.
333 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestPauseWhenLoadingDevTools) { 287 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPauseWhenLoadingDevTools) {
334 RunTest("testPauseWhenLoadingDevTools", kPauseWhenLoadingDevTools); 288 RunTest("testPauseWhenLoadingDevTools", kPauseWhenLoadingDevTools);
335 } 289 }
336 290
337 // Fails after WebKit roll 75765:75812 (likely 75791), http://crbug.com/69719
338 #if defined(OS_LINUX) || defined(OS_WIN)
339 #define MAYBE_TestPauseWhenScriptIsRunning DISABLED_TestPauseWhenScriptIsRunning
340 #else
341 #define MAYBE_TestPauseWhenScriptIsRunning TestPauseWhenScriptIsRunning
342 #endif // defined(OS_LINUX) || defined(OS_WIN)
343 // Tests that pressing 'Pause' will pause script execution if the script 291 // Tests that pressing 'Pause' will pause script execution if the script
344 // is already running. 292 // is already running.
345 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestPauseWhenScriptIsRunning) { 293 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPauseWhenScriptIsRunning) {
346 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning); 294 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning);
347 } 295 }
348 296
349 // Fails after WebKit roll 66724:66804, http://crbug.com/54592
350 #if defined(OS_LINUX) || defined(OS_WIN)
351 #define MAYBE_TestCompletionOnPause FAILS_TestCompletionOnPause
352 #else
353 #define MAYBE_TestCompletionOnPause TestCompletionOnPause
354 #endif // defined(OS_LINUX) || defined(OS_WIN)
355 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestCompletionOnPause) {
356 RunTest("testCompletionOnPause", kCompletionOnPause);
357 }
358
359 // Tests that 'Pause' button works for eval.
360 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) {
361 RunTest("testPauseInEval", kDebuggerTestPage);
362 }
363
364 } // namespace 297 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/devtools/completion_on_pause.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698