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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <tuple> | 7 #include <tuple> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 bool is_input_type_called = false; | 1755 bool is_input_type_called = false; |
1756 bool is_selection_called = false; | 1756 bool is_selection_called = false; |
1757 size_t last_input_type = 0; | 1757 size_t last_input_type = 0; |
1758 size_t last_selection = 0; | 1758 size_t last_selection = 0; |
1759 | 1759 |
1760 for (size_t i = 0; i < render_thread_->sink().message_count(); ++i) { | 1760 for (size_t i = 0; i < render_thread_->sink().message_count(); ++i) { |
1761 const uint32_t type = render_thread_->sink().GetMessageAt(i)->type(); | 1761 const uint32_t type = render_thread_->sink().GetMessageAt(i)->type(); |
1762 if (type == ViewHostMsg_TextInputStateChanged::ID) { | 1762 if (type == ViewHostMsg_TextInputStateChanged::ID) { |
1763 is_input_type_called = true; | 1763 is_input_type_called = true; |
1764 last_input_type = i; | 1764 last_input_type = i; |
1765 } else if (type == ViewHostMsg_SelectionChanged::ID) { | 1765 } else if (type == FrameHostMsg_SelectionChanged::ID) { |
1766 is_selection_called = true; | 1766 is_selection_called = true; |
1767 last_selection = i; | 1767 last_selection = i; |
1768 } | 1768 } |
1769 } | 1769 } |
1770 | 1770 |
1771 EXPECT_TRUE(is_input_type_called); | 1771 EXPECT_TRUE(is_input_type_called); |
1772 EXPECT_TRUE(is_selection_called); | 1772 EXPECT_TRUE(is_selection_called); |
1773 | 1773 |
1774 // InputTypeChange shold be called earlier than SelectionChanged. | 1774 // InputTypeChange shold be called earlier than SelectionChanged. |
1775 EXPECT_LT(last_input_type, last_selection); | 1775 EXPECT_LT(last_input_type, last_selection); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 ExpectPauseAndResume(3); | 2538 ExpectPauseAndResume(3); |
2539 blink::WebScriptSource source2( | 2539 blink::WebScriptSource source2( |
2540 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2540 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
2541 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2541 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
2542 | 2542 |
2543 EXPECT_FALSE(IsPaused()); | 2543 EXPECT_FALSE(IsPaused()); |
2544 Detach(); | 2544 Detach(); |
2545 } | 2545 } |
2546 | 2546 |
2547 } // namespace content | 2547 } // namespace content |
OLD | NEW |