| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 SendKeyPressToPlatformApp(ui::VKEY_TAB); | 1373 SendKeyPressToPlatformApp(ui::VKEY_TAB); |
| 1374 ExtensionTestMessageListener webview_button_not_focused_listener( | 1374 ExtensionTestMessageListener webview_button_not_focused_listener( |
| 1375 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); | 1375 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); |
| 1376 webview_button_not_focused_listener.set_failure_message( | 1376 webview_button_not_focused_listener.set_failure_message( |
| 1377 "WebViewInteractiveTest.WebViewButtonWasFocused"); | 1377 "WebViewInteractiveTest.WebViewButtonWasFocused"); |
| 1378 SendMessageToEmbedder("verify"); | 1378 SendMessageToEmbedder("verify"); |
| 1379 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); | 1379 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); |
| 1380 } | 1380 } |
| 1381 | 1381 |
| 1382 // TODO(crbug.com/602954) Test is flaky. | 1382 // TODO(crbug.com/602954) Test is flaky. |
| 1383 #if defined(OS_WIN) | 1383 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 1384 #define MAYBE_TopLevelWebContentsTracksCorrectly \ | 1384 #define MAYBE_TopLevelWebContentsTracksCorrectly \ |
| 1385 DISABLED_TopLevelWebContentsTracksCorrectly | 1385 DISABLED_TopLevelWebContentsTracksCorrectly |
| 1386 #else | 1386 #else |
| 1387 #define MAYBE_TopLevelWebContentsTracksCorrectly \ | 1387 #define MAYBE_TopLevelWebContentsTracksCorrectly \ |
| 1388 TopLevelWebContentsTracksCorrectly | 1388 TopLevelWebContentsTracksCorrectly |
| 1389 #endif | 1389 #endif |
| 1390 IN_PROC_BROWSER_TEST_P(WebViewTextInputStateInteractiveTest, | 1390 IN_PROC_BROWSER_TEST_P(WebViewTextInputStateInteractiveTest, |
| 1391 MAYBE_TopLevelWebContentsTracksCorrectly) { | 1391 MAYBE_TopLevelWebContentsTracksCorrectly) { |
| 1392 SetupTest("web_view/text_input_state", | 1392 SetupTest("web_view/text_input_state", |
| 1393 "/extensions/platform_apps/web_view/text_input_state/guest.html"); | 1393 "/extensions/platform_apps/web_view/text_input_state/guest.html"); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 | 1444 |
| 1445 // Now crash the <webview>. | 1445 // Now crash the <webview>. |
| 1446 guest_web_contents()->GetRenderProcessHost()->Shutdown(false, 0); | 1446 guest_web_contents()->GetRenderProcessHost()->Shutdown(false, 0); |
| 1447 | 1447 |
| 1448 // State should reset to none. | 1448 // State should reset to none. |
| 1449 TextInputStateHelper::WaitForDesiredState( | 1449 TextInputStateHelper::WaitForDesiredState( |
| 1450 embedder_web_contents(), | 1450 embedder_web_contents(), |
| 1451 base::Bind(&TextInputStateHelper::IsStateOfGivenType, | 1451 base::Bind(&TextInputStateHelper::IsStateOfGivenType, |
| 1452 ui::TEXT_INPUT_TYPE_NONE)); | 1452 ui::TEXT_INPUT_TYPE_NONE)); |
| 1453 } | 1453 } |
| OLD | NEW |