| 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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 6321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6332 EXPECT_EQ("third", web_contents()->GetTextInputState()->value); | 6332 EXPECT_EQ("third", web_contents()->GetTextInputState()->value); |
| 6333 | 6333 |
| 6334 // Send focus to the last input field in top frame. | 6334 // Send focus to the last input field in top frame. |
| 6335 press_tab_and_wait_for_text_input_state_change(root_rwh); | 6335 press_tab_and_wait_for_text_input_state_change(root_rwh); |
| 6336 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, root_rwhv->text_input_state()->type); | 6336 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, root_rwhv->text_input_state()->type); |
| 6337 EXPECT_EQ("fourth", root_rwhv->text_input_state()->value); | 6337 EXPECT_EQ("fourth", root_rwhv->text_input_state()->value); |
| 6338 | 6338 |
| 6339 EXPECT_EQ("fourth", web_contents()->GetTextInputState()->value); | 6339 EXPECT_EQ("fourth", web_contents()->GetTextInputState()->value); |
| 6340 } | 6340 } |
| 6341 | 6341 |
| 6342 // Disable this test on Android (http://crbug.com/603209) |
| 6343 #if defined(OS_ANDROID) |
| 6344 #define MAYBE_TextInputStateChangesAfterRendererCrashes \ |
| 6345 DISABLED_TextInputStateChangesAfterRendererCrashes |
| 6346 #else |
| 6347 #define MAYBE_TextInputStateChangesAfterRendererCrashes \ |
| 6348 TextInputStateChangesAfterRendererCrashes |
| 6349 #endif |
| 6350 |
| 6342 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 6351 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
| 6343 TextInputStateChangesAfterRendererCrashes) { | 6352 MAYBE_TextInputStateChangesAfterRendererCrashes) { |
| 6344 GURL main_url( | 6353 GURL main_url( |
| 6345 embedded_test_server()->GetURL("a.com", "/page_with_iframe.html")); | 6354 embedded_test_server()->GetURL("a.com", "/page_with_iframe.html")); |
| 6346 NavigateToURL(shell(), main_url); | 6355 NavigateToURL(shell(), main_url); |
| 6347 WebContentsImpl* contents = web_contents(); | 6356 WebContentsImpl* contents = web_contents(); |
| 6348 | 6357 |
| 6349 FrameTreeNode* root = contents->GetFrameTree()->root(); | 6358 FrameTreeNode* root = contents->GetFrameTree()->root(); |
| 6350 | 6359 |
| 6351 FrameTreeNode* child = root->child_at(0); | 6360 FrameTreeNode* child = root->child_at(0); |
| 6352 GURL child_url(embedded_test_server()->GetURL( | 6361 GURL child_url(embedded_test_server()->GetURL( |
| 6353 "b.com", "/textinput/page_with_input.html")); | 6362 "b.com", "/textinput/page_with_input.html")); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6407 root->current_frame_host()->GetRenderWidgetHost(); | 6416 root->current_frame_host()->GetRenderWidgetHost(); |
| 6408 press_tab_and_wait_for_state_change(root_rwh); | 6417 press_tab_and_wait_for_state_change(root_rwh); |
| 6409 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, contents->GetTextInputState()->type); | 6418 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, contents->GetTextInputState()->type); |
| 6410 | 6419 |
| 6411 // Crash the tab renderer and observer the input state going back to none. | 6420 // Crash the tab renderer and observer the input state going back to none. |
| 6412 RenderProcessHost* host_process = root_rwh->GetProcess(); | 6421 RenderProcessHost* host_process = root_rwh->GetProcess(); |
| 6413 crash_renderer_and_wait_for_input_state_none(host_process); | 6422 crash_renderer_and_wait_for_input_state_none(host_process); |
| 6414 } | 6423 } |
| 6415 | 6424 |
| 6416 } // namespace content | 6425 } // namespace content |
| OLD | NEW |