Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: chrome/browser/browser_keyevents_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 virtual void Observe(int type, 115 virtual void Observe(int type,
116 const content::NotificationSource& source, 116 const content::NotificationSource& source,
117 const content::NotificationDetails& details) OVERRIDE { 117 const content::NotificationDetails& details) OVERRIDE {
118 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); 118 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE);
119 content::Details<DomOperationNotificationDetails> dom_op_details(details); 119 content::Details<DomOperationNotificationDetails> dom_op_details(details);
120 // We might receive responses for other script execution, but we only 120 // We might receive responses for other script execution, but we only
121 // care about the test finished message. 121 // care about the test finished message.
122 if (dom_op_details->json == "\"FINISHED\"") { 122 if (dom_op_details->json == "\"FINISHED\"") {
123 finished_ = true; 123 finished_ = true;
124 if (waiting_) 124 if (waiting_)
125 MessageLoopForUI::current()->Quit(); 125 base::MessageLoopForUI::current()->Quit();
126 } 126 }
127 } 127 }
128 128
129 private: 129 private:
130 bool finished_; 130 bool finished_;
131 bool waiting_; 131 bool waiting_;
132 content::NotificationRegistrar registrar_; 132 content::NotificationRegistrar registrar_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(TestFinishObserver); 134 DISALLOW_COPY_AND_ASSIGN(TestFinishObserver);
135 }; 135 };
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); 892 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress));
893 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 893 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
894 894
895 // Ctrl+Alt should have no effect. 895 // Ctrl+Alt should have no effect.
896 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); 896 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey));
897 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 897 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
898 } 898 }
899 #endif 899 #endif
900 900
901 } // namespace 901 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698