| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) | 541 #if defined(OS_MACOSX) |
| 542 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker | 542 #define MAYBE_InspectSharedWorker DISABLED_InspectSharedWorker |
| 543 #else | 543 #else |
| 544 #define MAYBE_InspectSharedWorker InspectSharedWorker | 544 #define MAYBE_InspectSharedWorker FAILS_InspectSharedWorker |
| 545 #endif | 545 #endif |
| 546 // Flakily fails with 25s timeout: http://crbug.com/89845 | 546 // Flakily fails with 25s timeout: http://crbug.com/89845 |
| 547 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, MAYBE_InspectSharedWorker) { | 547 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, MAYBE_InspectSharedWorker) { |
| 548 RunTest("testSharedWorker", kSharedWorkerTestPage); | 548 RunTest("testSharedWorker", kSharedWorkerTestPage); |
| 549 } | 549 } |
| 550 | 550 |
| 551 // http://crbug.com/100538 | 551 // http://crbug.com/100538 |
| 552 #if defined(OS_MACOSX) | 552 #if defined(OS_MACOSX) |
| 553 #define MAYBE_PauseInSharedWorkerInitialization DISABLED_PauseInSharedWorkerInit
ialization | 553 #define MAYBE_PauseInSharedWorkerInitialization DISABLED_PauseInSharedWorkerInit
ialization |
| 554 #elif defined(OS_WIN) | |
| 555 #define MAYBE_PauseInSharedWorkerInitialization FLAKY_PauseInSharedWorkerInitial
ization | |
| 556 #else | 554 #else |
| 557 #define MAYBE_PauseInSharedWorkerInitialization PauseInSharedWorkerInitializatio
n | 555 #define MAYBE_PauseInSharedWorkerInitialization FAILS_PauseInSharedWorkerInitial
ization |
| 558 #endif | 556 #endif |
| 559 // See http://crbug.com/100538 | 557 // See http://crbug.com/100538 |
| 560 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, | 558 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, |
| 561 MAYBE_PauseInSharedWorkerInitialization) { | 559 MAYBE_PauseInSharedWorkerInitialization) { |
| 562 ASSERT_TRUE(test_server()->Start()); | 560 ASSERT_TRUE(test_server()->Start()); |
| 563 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage); | 561 GURL url = test_server()->GetURL(kReloadSharedWorkerTestPage); |
| 564 ui_test_utils::NavigateToURL(browser(), url); | 562 ui_test_utils::NavigateToURL(browser(), url); |
| 565 | 563 |
| 566 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker(); | 564 scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker(); |
| 567 OpenDevToolsWindowForSharedWorker(worker_data.get()); | 565 OpenDevToolsWindowForSharedWorker(worker_data.get()); |
| 568 | 566 |
| 569 TerminateWorker(worker_data); | 567 TerminateWorker(worker_data); |
| 570 | 568 |
| 571 // Reload page to restart the worker. | 569 // Reload page to restart the worker. |
| 572 ui_test_utils::NavigateToURL(browser(), url); | 570 ui_test_utils::NavigateToURL(browser(), url); |
| 573 | 571 |
| 574 // Wait until worker script is paused on the debugger statement. | 572 // Wait until worker script is paused on the debugger statement. |
| 575 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); | 573 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); |
| 576 CloseDevToolsWindow(); | 574 CloseDevToolsWindow(); |
| 577 } | 575 } |
| 578 | 576 |
| 579 } // namespace | 577 } // namespace |
| OLD | NEW |