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

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

Issue 10387176: Enable some DevTools browsertests which should pass after recent fixes in WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MAYBE to InspectSharedWorker Created 8 years, 7 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 | no next file » | 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) 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/cancelable_callback.h" 6 #include "base/cancelable_callback.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 Browser* browser = window_->browser(); 409 Browser* browser = window_->browser();
410 browser->CloseAllTabs(); 410 browser->CloseAllTabs();
411 BrowserClosedObserver close_observer(browser); 411 BrowserClosedObserver close_observer(browser);
412 } 412 }
413 413
414 DevToolsWindow* window_; 414 DevToolsWindow* window_;
415 }; 415 };
416 416
417 417
418 // Tests scripts panel showing. 418 // Tests scripts panel showing.
419 // Disabled - see http://crbug.com/124300 419 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) {
420 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestShowScriptsTab) {
421 RunTest("testShowScriptsTab", kDebuggerTestPage); 420 RunTest("testShowScriptsTab", kDebuggerTestPage);
422 } 421 }
423 422
424 // Tests that scripts tab is populated with inspected scripts even if it 423 // Tests that scripts tab is populated with inspected scripts even if it
425 // hadn't been shown by the moment inspected paged refreshed. 424 // hadn't been shown by the moment inspected paged refreshed.
426 // @see http://crbug.com/26312 425 // @see http://crbug.com/26312
427 IN_PROC_BROWSER_TEST_F( 426 IN_PROC_BROWSER_TEST_F(
428 DevToolsSanityTest, 427 DevToolsSanityTest,
429 DISABLED_TestScriptsTabIsPopulatedOnInspectedPageRefresh) { 428 TestScriptsTabIsPopulatedOnInspectedPageRefresh) {
430 // Clear inspector settings to ensure that Elements will be 429 // Clear inspector settings to ensure that Elements will be
431 // current panel when DevTools window is open. 430 // current panel when DevTools window is open.
432 content::GetContentClient()->browser()->ClearInspectorSettings( 431 content::GetContentClient()->browser()->ClearInspectorSettings(
433 GetInspectedTab()->GetRenderViewHost()); 432 GetInspectedTab()->GetRenderViewHost());
434 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", 433 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh",
435 kDebuggerTestPage); 434 kDebuggerTestPage);
436 } 435 }
437 436
438 // Tests that chrome.devtools extension is correctly exposed. 437 // Tests that chrome.devtools extension is correctly exposed.
439 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, 438 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest,
(...skipping 14 matching lines...) Expand all
454 // when the extension has experimental permission. 453 // when the extension has experimental permission.
455 IN_PROC_BROWSER_TEST_F(DevToolsExperimentalExtensionTest, 454 IN_PROC_BROWSER_TEST_F(DevToolsExperimentalExtensionTest,
456 TestDevToolsExperimentalExtensionAPI) { 455 TestDevToolsExperimentalExtensionAPI) {
457 LoadExtension("devtools_experimental"); 456 LoadExtension("devtools_experimental");
458 RunTest("waitForTestResultsInConsole", ""); 457 RunTest("waitForTestResultsInConsole", "");
459 } 458 }
460 459
461 // Tests that a content script is in the scripts list. 460 // Tests that a content script is in the scripts list.
462 // http://crbug.com/114104 461 // http://crbug.com/114104
463 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, 462 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest,
464 DISABLED_TestContentScriptIsPresent) { 463 TestContentScriptIsPresent) {
465 LoadExtension("simple_content_script"); 464 LoadExtension("simple_content_script");
466 RunTest("testContentScriptIsPresent", kPageWithContentScript); 465 RunTest("testContentScriptIsPresent", kPageWithContentScript);
467 } 466 }
468 467
469 // Tests that scripts are not duplicated after Scripts Panel switch. 468 // Tests that scripts are not duplicated after Scripts Panel switch.
470 // Disabled - see http://crbug.com/124300 469 // Disabled - see http://crbug.com/124300
471 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, 470 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest,
472 TestNoScriptDuplicatesOnPanelSwitch) { 471 TestNoScriptDuplicatesOnPanelSwitch) {
473 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage); 472 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage);
474 } 473 }
475 474
476 // Tests that debugger works correctly if pause event occurs when DevTools 475 // Tests that debugger works correctly if pause event occurs when DevTools
477 // frontend is being loaded. 476 // frontend is being loaded.
478 // http://crbug.com/106114 477 // http://crbug.com/106114
479 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, 478 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest,
480 DISABLED_TestPauseWhenLoadingDevTools) { 479 TestPauseWhenLoadingDevTools) {
481 RunTest("testPauseWhenLoadingDevTools", kPauseWhenLoadingDevTools); 480 RunTest("testPauseWhenLoadingDevTools", kPauseWhenLoadingDevTools);
482 } 481 }
483 482
484 // Tests that pressing 'Pause' will pause script execution if the script 483 // Tests that pressing 'Pause' will pause script execution if the script
485 // is already running. 484 // is already running.
486 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPauseWhenScriptIsRunning) { 485 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPauseWhenScriptIsRunning) {
487 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning); 486 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning);
488 } 487 }
489 488
490 // Tests network timing. 489 // Tests network timing.
(...skipping 25 matching lines...) Expand all
516 // Tests raw headers text. 515 // Tests raw headers text.
517 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestNetworkRawHeadersText) { 516 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestNetworkRawHeadersText) {
518 RunTest("testNetworkRawHeadersText", kChunkedTestPage); 517 RunTest("testNetworkRawHeadersText", kChunkedTestPage);
519 } 518 }
520 519
521 // Tests that console messages are not duplicated on navigation back. 520 // Tests that console messages are not duplicated on navigation back.
522 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleOnNavigateBack) { 521 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleOnNavigateBack) {
523 RunTest("testConsoleOnNavigateBack", kNavigateBackTestPage); 522 RunTest("testConsoleOnNavigateBack", kNavigateBackTestPage);
524 } 523 }
525 524
526 #if defined(OS_LINUX) || defined(OS_MACOSX) 525 #if defined(OS_MACOSX)
527 // http://crbug.com/103539 526 // http://crbug.com/103539
528 #define TestReattachAfterCrash DISABLED_TestReattachAfterCrash 527 #define TestReattachAfterCrash DISABLED_TestReattachAfterCrash
529 #endif 528 #endif
530 // Tests that inspector will reattach to inspected page when it is reloaded 529 // Tests that inspector will reattach to inspected page when it is reloaded
531 // after a crash. See http://crbug.com/101952 530 // after a crash. See http://crbug.com/101952
532 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) { 531 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) {
533 OpenDevToolsWindow(kDebuggerTestPage); 532 OpenDevToolsWindow(kDebuggerTestPage);
534 533
535 ui_test_utils::CrashTab(GetInspectedTab()); 534 ui_test_utils::CrashTab(GetInspectedTab());
536 ui_test_utils::WindowedNotificationObserver observer( 535 ui_test_utils::WindowedNotificationObserver observer(
(...skipping 17 matching lines...) Expand all
554 L"", 553 L"",
555 L"window.domAutomationController.send(" 554 L"window.domAutomationController.send("
556 L"'' + (window.uiTests && (typeof uiTests.runTest)));", 555 L"'' + (window.uiTests && (typeof uiTests.runTest)));",
557 &result)); 556 &result));
558 ASSERT_EQ("function", result) << "DevTools front-end is broken."; 557 ASSERT_EQ("function", result) << "DevTools front-end is broken.";
559 CloseDevToolsWindow(); 558 CloseDevToolsWindow();
560 } 559 }
561 560
562 #if defined(OS_MACOSX) 561 #if defined(OS_MACOSX)
563 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker 562 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker
564 #elif !defined(NDEBUG)
565 // Now fails consistently on Windows and Linux debug, http://crbug.com/115192
566 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker
567 #else 563 #else
568 #define MAYBE_InspectSharedWorker InspectSharedWorker 564 #define MAYBE_InspectSharedWorker InspectSharedWorker
569 #endif 565 #endif
570 // Flakily fails with 25s timeout: http://crbug.com/89845 566 // Flakily fails with 25s timeout: http://crbug.com/89845
571 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, MAYBE_InspectSharedWorker) { 567 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, MAYBE_InspectSharedWorker) {
572 RunTest("testSharedWorker", kSharedWorkerTestPage); 568 RunTest("testSharedWorker", kSharedWorkerTestPage);
573 } 569 }
574 570
575 // http://crbug.com/100538 571 // http://crbug.com/100538
576 #if defined(OS_MACOSX) || defined(OS_WIN) 572 #if defined(OS_MACOSX) || defined(OS_WIN)
577 #define MAYBE_PauseInSharedWorkerInitialization DISABLED_PauseInSharedWorkerInit ialization 573 #define MAYBE_PauseInSharedWorkerInitialization DISABLED_PauseInSharedWorkerInit ialization
578 #else 574 #else
579 #define MAYBE_PauseInSharedWorkerInitialization PauseInSharedWorkerInitializatio n 575 #define MAYBE_PauseInSharedWorkerInitialization PauseInSharedWorkerInitializatio n
580 #endif 576 #endif
581 577
582 // http://crbug.com/106114 is masking 578 // http://crbug.com/106114 is masking
583 // MAYBE_PauseInSharedWorkerInitialization into 579 // MAYBE_PauseInSharedWorkerInitialization into
584 // DISABLED_PauseInSharedWorkerInitialization 580 // DISABLED_PauseInSharedWorkerInitialization
585 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, 581 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest,
586 DISABLED_PauseInSharedWorkerInitialization) { 582 MAYBE_PauseInSharedWorkerInitialization) {
587 ASSERT_TRUE(test_server()->Start()); 583 ASSERT_TRUE(test_server()->Start());
588 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage); 584 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage);
589 ui_test_utils::NavigateToURL(browser(), url); 585 ui_test_utils::NavigateToURL(browser(), url);
590 586
591 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker(); 587 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker();
592 OpenDevToolsWindowForSharedWorker(worker_data.get()); 588 OpenDevToolsWindowForSharedWorker(worker_data.get());
593 589
594 TerminateWorker(worker_data); 590 TerminateWorker(worker_data);
595 591
596 // Reload page to restart the worker. 592 // Reload page to restart the worker.
(...skipping 14 matching lines...) Expand all
611 content::CONSOLE_MESSAGE_LEVEL_LOG, 607 content::CONSOLE_MESSAGE_LEVEL_LOG,
612 "log"); 608 "log");
613 devtools_manager->AddMessageToConsole(agent_host, 609 devtools_manager->AddMessageToConsole(agent_host,
614 content::CONSOLE_MESSAGE_LEVEL_ERROR, 610 content::CONSOLE_MESSAGE_LEVEL_ERROR,
615 "error"); 611 "error");
616 RunTestFunction(window_, "checkLogAndErrorMessages"); 612 RunTestFunction(window_, "checkLogAndErrorMessages");
617 CloseDevToolsWindow(); 613 CloseDevToolsWindow();
618 } 614 }
619 615
620 } // namespace 616 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698