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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 // Tests scripts panel showing. | 350 // Tests scripts panel showing. |
351 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { | 351 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { |
352 RunTest("testShowScriptsTab", kDebuggerTestPage); | 352 RunTest("testShowScriptsTab", kDebuggerTestPage); |
353 } | 353 } |
354 | 354 |
355 // Tests that scripts tab is populated with inspected scripts even if it | 355 // Tests that scripts tab is populated with inspected scripts even if it |
356 // hadn't been shown by the moment inspected paged refreshed. | 356 // hadn't been shown by the moment inspected paged refreshed. |
357 // @see http://crbug.com/26312 | 357 // @see http://crbug.com/26312 |
358 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 358 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, |
359 DISABLED_TestScriptsTabIsPopulatedOnInspectedPageRefresh)
{ | 359 TestScriptsTabIsPopulatedOnInspectedPageRefresh) { |
360 // Clear inspector settings to ensure that Elements will be | 360 // Clear inspector settings to ensure that Elements will be |
361 // current panel when DevTools window is open. | 361 // current panel when DevTools window is open. |
362 content::GetContentClient()->browser()->ClearInspectorSettings( | 362 content::GetContentClient()->browser()->ClearInspectorSettings( |
363 GetInspectedTab()->render_view_host()); | 363 GetInspectedTab()->render_view_host()); |
364 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", | 364 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", |
365 kDebuggerTestPage); | 365 kDebuggerTestPage); |
366 } | 366 } |
367 | 367 |
368 // Tests that a content script is in the scripts list. | 368 // Tests that a content script is in the scripts list. |
369 // This test is disabled, see bug 28961. | 369 // This test is disabled, see bug 28961. |
(...skipping 18 matching lines...) Expand all Loading... |
388 } | 388 } |
389 | 389 |
390 // Tests that pressing 'Pause' will pause script execution if the script | 390 // Tests that pressing 'Pause' will pause script execution if the script |
391 // is already running. | 391 // is already running. |
392 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 392 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, |
393 DISABLED_TestPauseWhenScriptIsRunning) { | 393 DISABLED_TestPauseWhenScriptIsRunning) { |
394 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning); | 394 RunTest("testPauseWhenScriptIsRunning", kPauseWhenScriptIsRunning); |
395 } | 395 } |
396 | 396 |
397 // Tests network timing. | 397 // Tests network timing. |
398 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestNetworkTiming) { | 398 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestNetworkTiming) { |
399 RunTest("testNetworkTiming", kSlowTestPage); | 399 RunTest("testNetworkTiming", kSlowTestPage); |
400 } | 400 } |
401 | 401 |
402 // Tests network size. | 402 // Tests network size. |
403 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestNetworkSize) { | 403 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestNetworkSize) { |
404 RunTest("testNetworkSize", kChunkedTestPage); | 404 RunTest("testNetworkSize", kChunkedTestPage); |
405 } | 405 } |
406 | 406 |
407 // Tests raw headers text. | 407 // Tests raw headers text. |
408 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestNetworkSyncSize) { | 408 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestNetworkSyncSize) { |
409 RunTest("testNetworkSyncSize", kChunkedTestPage); | 409 RunTest("testNetworkSyncSize", kChunkedTestPage); |
410 } | 410 } |
411 | 411 |
412 // Tests raw headers text. | 412 // Tests raw headers text. |
413 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 413 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestNetworkRawHeadersText) { |
414 DISABLED_TestNetworkRawHeadersText) { | |
415 RunTest("testNetworkRawHeadersText", kChunkedTestPage); | 414 RunTest("testNetworkRawHeadersText", kChunkedTestPage); |
416 } | 415 } |
417 | 416 |
418 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPageWithNoJavaScript) { | 417 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestPageWithNoJavaScript) { |
419 OpenDevToolsWindow("about:blank"); | 418 OpenDevToolsWindow("about:blank"); |
420 std::string result; | 419 std::string result; |
421 ASSERT_TRUE( | 420 ASSERT_TRUE( |
422 ui_test_utils::ExecuteJavaScriptAndExtractString( | 421 ui_test_utils::ExecuteJavaScriptAndExtractString( |
423 window_->GetRenderViewHost(), | 422 window_->GetRenderViewHost(), |
424 L"", | 423 L"", |
425 L"window.domAutomationController.send(" | 424 L"window.domAutomationController.send(" |
426 L"'' + (window.uiTests && (typeof uiTests.runTest)));", | 425 L"'' + (window.uiTests && (typeof uiTests.runTest)));", |
427 &result)); | 426 &result)); |
428 ASSERT_EQ("function", result) << "DevTools front-end is broken."; | 427 ASSERT_EQ("function", result) << "DevTools front-end is broken."; |
429 CloseDevToolsWindow(); | 428 CloseDevToolsWindow(); |
430 } | 429 } |
431 | 430 |
432 // Flakily fails with 25s timeout: http://crbug.com/89845 | 431 // Flakily fails with 25s timeout: http://crbug.com/89845 |
433 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, DISABLED_InspectSharedWorker) { | 432 IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, DISABLED_InspectSharedWorker) { |
434 RunTest("testSharedWorker", kSharedWorkerTestPage); | 433 RunTest("testSharedWorker", kSharedWorkerTestPage); |
435 } | 434 } |
436 | 435 |
437 } // namespace | 436 } // namespace |
OLD | NEW |