OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 ui_test_utils::ExecuteJavaScriptAndExtractString( | 531 ui_test_utils::ExecuteJavaScriptAndExtractString( |
532 window_->GetRenderViewHost(), | 532 window_->GetRenderViewHost(), |
533 L"", | 533 L"", |
534 L"window.domAutomationController.send(" | 534 L"window.domAutomationController.send(" |
535 L"'' + (window.uiTests && (typeof uiTests.runTest)));", | 535 L"'' + (window.uiTests && (typeof uiTests.runTest)));", |
536 &result)); | 536 &result)); |
537 ASSERT_EQ("function", result) << "DevTools front-end is broken."; | 537 ASSERT_EQ("function", result) << "DevTools front-end is broken."; |
538 CloseDevToolsWindow(); | 538 CloseDevToolsWindow(); |
539 } | 539 } |
540 | 540 |
541 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) | |
542 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker | |
543 #else | |
544 #define MAYBE_InspectSharedWorker FAILS_InspectSharedWorker | |
545 #endif | |
546 // Flakily fails with 25s timeout: http://crbug.com/89845 | 541 // Flakily fails with 25s timeout: http://crbug.com/89845 |
547 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, MAYBE_InspectSharedWorker) { | 542 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, DISABLED_InspectSharedWorker) { |
548 RunTest("testSharedWorker", kSharedWorkerTestPage); | 543 RunTest("testSharedWorker", kSharedWorkerTestPage); |
549 } | 544 } |
550 | 545 |
551 // http://crbug.com/100538 | |
552 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) | |
553 #define MAYBE_PauseInSharedWorkerInitialization DISABLED_PauseInSharedWorkerInit
ialization | |
554 #else | |
555 #define MAYBE_PauseInSharedWorkerInitialization FAILS_PauseInSharedWorkerInitial
ization | |
556 #endif | |
557 // See http://crbug.com/100538 | |
558 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, | 546 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, |
559 MAYBE_PauseInSharedWorkerInitialization) { | 547 DISABLED_PauseInSharedWorkerInitialization) { |
560 ASSERT_TRUE(test_server()->Start()); | 548 ASSERT_TRUE(test_server()->Start()); |
561 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage); | 549 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage); |
562 ui_test_utils::NavigateToURL(browser(), url); | 550 ui_test_utils::NavigateToURL(browser(), url); |
563 | 551 |
564 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker(); | 552 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker(); |
565 OpenDevToolsWindowForSharedWorker(worker_data.get()); | 553 OpenDevToolsWindowForSharedWorker(worker_data.get()); |
566 | 554 |
567 TerminateWorker(worker_data); | 555 TerminateWorker(worker_data); |
568 | 556 |
569 // Reload page to restart the worker. | 557 // Reload page to restart the worker. |
570 ui_test_utils::NavigateToURL(browser(), url); | 558 ui_test_utils::NavigateToURL(browser(), url); |
571 | 559 |
572 // Wait until worker script is paused on the debugger statement. | 560 // Wait until worker script is paused on the debugger statement. |
573 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); | 561 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); |
574 CloseDevToolsWindow(); | 562 CloseDevToolsWindow(); |
575 } | 563 } |
576 | 564 |
577 } // namespace | 565 } // namespace |
OLD | NEW |