OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/ui/native_app_window.h" | 5 #include "apps/ui/native_app_window.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/apps/app_browsertest_util.h" | 9 #include "chrome/browser/apps/app_browsertest_util.h" |
10 #include "chrome/browser/automation/automation_util.h" | 10 #include "chrome/browser/automation/automation_util.h" |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 | 1585 |
1586 IN_PROC_BROWSER_TEST_F(WebViewTest, SpeechRecognition) { | 1586 IN_PROC_BROWSER_TEST_F(WebViewTest, SpeechRecognition) { |
1587 ASSERT_TRUE(StartEmbeddedTestServer()); | 1587 ASSERT_TRUE(StartEmbeddedTestServer()); |
1588 content::WebContents* guest_web_contents = LoadGuest( | 1588 content::WebContents* guest_web_contents = LoadGuest( |
1589 "/extensions/platform_apps/web_view/speech/guest.html", | 1589 "/extensions/platform_apps/web_view/speech/guest.html", |
1590 "web_view/speech"); | 1590 "web_view/speech"); |
1591 ASSERT_TRUE(guest_web_contents); | 1591 ASSERT_TRUE(guest_web_contents); |
1592 | 1592 |
1593 // Click on the guest (center of the WebContents), the guest is rendered in a | 1593 // Click on the guest (center of the WebContents), the guest is rendered in a |
1594 // way that this will trigger clicking on speech recognition input mic. | 1594 // way that this will trigger clicking on speech recognition input mic. |
1595 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); | 1595 SimulateMouseClick(guest_web_contents, 0, blink::WebMouseEvent::ButtonLeft); |
1596 | 1596 |
1597 string16 expected_title(ASCIIToUTF16("PASSED")); | 1597 string16 expected_title(ASCIIToUTF16("PASSED")); |
1598 string16 error_title(ASCIIToUTF16("FAILED")); | 1598 string16 error_title(ASCIIToUTF16("FAILED")); |
1599 content::TitleWatcher title_watcher(guest_web_contents, expected_title); | 1599 content::TitleWatcher title_watcher(guest_web_contents, expected_title); |
1600 title_watcher.AlsoWaitForTitle(error_title); | 1600 title_watcher.AlsoWaitForTitle(error_title); |
1601 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 1601 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
1602 } | 1602 } |
1603 | 1603 |
1604 // Flaky on Windows. http://crbug.com/303966 | 1604 // Flaky on Windows. http://crbug.com/303966 |
1605 #if defined(OS_WIN) | 1605 #if defined(OS_WIN) |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 } | 1883 } |
1884 }; | 1884 }; |
1885 | 1885 |
1886 IN_PROC_BROWSER_TEST_F(WebViewPluginTest, TestLoadPluginEvent) { | 1886 IN_PROC_BROWSER_TEST_F(WebViewPluginTest, TestLoadPluginEvent) { |
1887 TestHelper("testPluginLoadPermission", | 1887 TestHelper("testPluginLoadPermission", |
1888 "DoneShimTest.PASSED", | 1888 "DoneShimTest.PASSED", |
1889 "DoneShimTest.FAILED", | 1889 "DoneShimTest.FAILED", |
1890 "web_view/shim"); | 1890 "web_view/shim"); |
1891 } | 1891 } |
1892 #endif // defined(ENABLE_PLUGINS) | 1892 #endif // defined(ENABLE_PLUGINS) |
OLD | NEW |