OLD | NEW |
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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 base::string16 expected_title(ASCIIToUTF16("OK")); | 433 base::string16 expected_title(ASCIIToUTF16("OK")); |
434 TitleWatcher title_watcher(shell()->web_contents(), expected_title); | 434 TitleWatcher title_watcher(shell()->web_contents(), expected_title); |
435 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); | 435 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); |
436 // TODO(stuartmorgan): When the automation system supports sending clicks, | 436 // TODO(stuartmorgan): When the automation system supports sending clicks, |
437 // change the test to trigger on mouse-down rather than window focus. | 437 // change the test to trigger on mouse-down rather than window focus. |
438 | 438 |
439 // TODO: is this code still needed? It was here when it used to run in | 439 // TODO: is this code still needed? It was here when it used to run in |
440 // browser_tests. | 440 // browser_tests. |
441 //static_cast<WebContentsDelegate*>(shell())-> | 441 //static_cast<WebContentsDelegate*>(shell())-> |
442 // ActivateContents(shell()->web_contents()); | 442 // ActivateContents(shell()->web_contents(), false /* user_gesture */); |
443 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 443 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
444 } | 444 } |
445 #endif | 445 #endif |
446 | 446 |
447 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(Flash)) { | 447 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(Flash)) { |
448 TestPlugin("flash.html"); | 448 TestPlugin("flash.html"); |
449 } | 449 } |
450 | 450 |
451 #if defined(OS_WIN) | 451 #if defined(OS_WIN) |
452 // Windows only test | 452 // Windows only test |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 ResourceDispatcherHostDelegate* old_delegate = | 570 ResourceDispatcherHostDelegate* old_delegate = |
571 ResourceDispatcherHostImpl::Get()->delegate(); | 571 ResourceDispatcherHostImpl::Get()->delegate(); |
572 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); | 572 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); |
573 LoadAndWait(url); | 573 LoadAndWait(url); |
574 test_delegate.WaitForPluginRequest(); | 574 test_delegate.WaitForPluginRequest(); |
575 ASSERT_TRUE(test_delegate.found_cookie()); | 575 ASSERT_TRUE(test_delegate.found_cookie()); |
576 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); | 576 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); |
577 } | 577 } |
578 | 578 |
579 } // namespace content | 579 } // namespace content |
OLD | NEW |