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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/automation/automation_util.h" | 6 #include "chrome/browser/automation/automation_util.h" |
7 #include "chrome/browser/extensions/extension_test_message_listener.h" | 7 #include "chrome/browser/extensions/extension_test_message_listener.h" |
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
9 #include "chrome/browser/prerender/prerender_link_manager.h" | 9 #include "chrome/browser/prerender/prerender_link_manager.h" |
10 #include "chrome/browser/prerender/prerender_link_manager_factory.h" | 10 #include "chrome/browser/prerender/prerender_link_manager_factory.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
14 #include "chrome/test/base/test_launcher_utils.h" | 14 #include "chrome/test/base/test_launcher_utils.h" |
15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
16 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
17 #include "content/public/test/browser_test_utils.h" | 17 #include "content/public/test/browser_test_utils.h" |
18 #include "content/public/test/fake_speech_recognition_manager.h" | 18 #include "content/public/test/fake_speech_recognition_manager.h" |
19 #include "ui/compositor/compositor_setup.h" | 19 #include "ui/compositor/compositor_setup.h" |
20 #include "ui/gl/gl_switches.h" | 20 #include "ui/gl/gl_switches.h" |
21 | 21 |
22 using prerender::PrerenderLinkManager; | 22 using prerender::PrerenderLinkManager; |
23 using prerender::PrerenderLinkManagerFactory; | 23 using prerender::PrerenderLinkManagerFactory; |
24 | 24 |
25 class WebViewTest : public extensions::PlatformAppBrowserTest { | 25 class WebViewTest : public extensions::PlatformAppBrowserTest { |
26 protected: | 26 protected: |
27 virtual void SetUpCommandLine(CommandLine* command_line) { | 27 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
28 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); | 28 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); |
29 #if !defined(OS_MACOSX) | 29 #if !defined(OS_MACOSX) |
30 CHECK(test_launcher_utils::OverrideGLImplementation( | 30 CHECK(test_launcher_utils::OverrideGLImplementation( |
31 command_line, gfx::kGLImplementationOSMesaName)) << | 31 command_line, gfx::kGLImplementationOSMesaName)) << |
32 "kUseGL must not be set by test framework code!"; | 32 "kUseGL must not be set by test framework code!"; |
33 #endif | 33 #endif |
34 } | 34 } |
35 | 35 |
36 virtual void SetUp() OVERRIDE { | 36 virtual void SetUp() OVERRIDE { |
37 const testing::TestInfo* const test_info = | 37 const testing::TestInfo* const test_info = |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 // Click on the guest (center of the WebContents), the guest is rendered in a | 695 // Click on the guest (center of the WebContents), the guest is rendered in a |
696 // way that this will trigger clicking on speech recognition input mic. | 696 // way that this will trigger clicking on speech recognition input mic. |
697 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); | 697 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); |
698 | 698 |
699 string16 expected_title(ASCIIToUTF16("PASSED")); | 699 string16 expected_title(ASCIIToUTF16("PASSED")); |
700 string16 error_title(ASCIIToUTF16("FAILED")); | 700 string16 error_title(ASCIIToUTF16("FAILED")); |
701 content::TitleWatcher title_watcher(guest_web_contents, expected_title); | 701 content::TitleWatcher title_watcher(guest_web_contents, expected_title); |
702 title_watcher.AlsoWaitForTitle(error_title); | 702 title_watcher.AlsoWaitForTitle(error_title); |
703 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 703 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
704 } | 704 } |
OLD | NEW |