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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 public: | 92 public: |
93 explicit TestFinishObserver(RenderViewHost* render_view_host) | 93 explicit TestFinishObserver(RenderViewHost* render_view_host) |
94 : finished_(false), waiting_(false) { | 94 : finished_(false), waiting_(false) { |
95 registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, | 95 registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, |
96 content::Source<RenderViewHost>(render_view_host)); | 96 content::Source<RenderViewHost>(render_view_host)); |
97 } | 97 } |
98 | 98 |
99 bool WaitForFinish() { | 99 bool WaitForFinish() { |
100 if (!finished_) { | 100 if (!finished_) { |
101 waiting_ = true; | 101 waiting_ = true; |
102 ui_test_utils::RunMessageLoop(); | 102 content::RunMessageLoop(); |
103 waiting_ = false; | 103 waiting_ = false; |
104 } | 104 } |
105 return finished_; | 105 return finished_; |
106 } | 106 } |
107 | 107 |
108 virtual void Observe(int type, | 108 virtual void Observe(int type, |
109 const content::NotificationSource& source, | 109 const content::NotificationSource& source, |
110 const content::NotificationDetails& details) { | 110 const content::NotificationDetails& details) { |
111 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); | 111 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); |
112 content::Details<DomOperationNotificationDetails> dom_op_details(details); | 112 content::Details<DomOperationNotificationDetails> dom_op_details(details); |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); | 882 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); |
883 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 883 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
884 | 884 |
885 // Ctrl+Alt should have no effect. | 885 // Ctrl+Alt should have no effect. |
886 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); | 886 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); |
887 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 887 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
888 } | 888 } |
889 #endif | 889 #endif |
890 | 890 |
891 } // namespace | 891 } // namespace |
OLD | NEW |