| 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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 if (!finished_) { | 104 if (!finished_) { |
| 105 waiting_ = true; | 105 waiting_ = true; |
| 106 content::RunMessageLoop(); | 106 content::RunMessageLoop(); |
| 107 waiting_ = false; | 107 waiting_ = false; |
| 108 } | 108 } |
| 109 return finished_; | 109 return finished_; |
| 110 } | 110 } |
| 111 | 111 |
| 112 virtual void Observe(int type, | 112 virtual void Observe(int type, |
| 113 const content::NotificationSource& source, | 113 const content::NotificationSource& source, |
| 114 const content::NotificationDetails& details) OVERRIDE { | 114 const content::NotificationDetails& details) override { |
| 115 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); | 115 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); |
| 116 content::Details<DomOperationNotificationDetails> dom_op_details(details); | 116 content::Details<DomOperationNotificationDetails> dom_op_details(details); |
| 117 // We might receive responses for other script execution, but we only | 117 // We might receive responses for other script execution, but we only |
| 118 // care about the test finished message. | 118 // care about the test finished message. |
| 119 if (dom_op_details->json == "\"FINISHED\"") { | 119 if (dom_op_details->json == "\"FINISHED\"") { |
| 120 finished_ = true; | 120 finished_ = true; |
| 121 if (waiting_) | 121 if (waiting_) |
| 122 base::MessageLoopForUI::current()->Quit(); | 122 base::MessageLoopForUI::current()->Quit(); |
| 123 } | 123 } |
| 124 } | 124 } |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); | 864 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); |
| 865 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 865 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 866 | 866 |
| 867 // Ctrl+Alt should have no effect. | 867 // Ctrl+Alt should have no effect. |
| 868 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); | 868 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); |
| 869 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 869 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 870 } | 870 } |
| 871 #endif | 871 #endif |
| 872 | 872 |
| 873 } // namespace | 873 } // namespace |
| OLD | NEW |