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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc

Issue 739323002: Requests for tabs permission for VirtualKeyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "content/public/test/browser_test_utils.h" 9 #include "content/public/test/browser_test_utils.h"
10 #include "content/public/test/test_utils.h" 10 #include "content/public/test/test_utils.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::Bind(&KeyEventDoneCallback::Run, 187 base::Bind(&KeyEventDoneCallback::Run,
188 base::Unretained(&callback))); 188 base::Unretained(&callback)));
189 ASSERT_TRUE(keyevent_listener.WaitUntilSatisfied()); 189 ASSERT_TRUE(keyevent_listener.WaitUntilSatisfied());
190 ASSERT_TRUE(keyevent_listener.was_satisfied()); 190 ASSERT_TRUE(keyevent_listener.was_satisfied());
191 callback.WaitUntilCalled(); 191 callback.WaitUntilCalled();
192 192
193 // onSurroundingTextChange should be fired if SetSurroundingText is called. 193 // onSurroundingTextChange should be fired if SetSurroundingText is called.
194 ExtensionTestMessageListener surrounding_text_listener( 194 ExtensionTestMessageListener surrounding_text_listener(
195 "onSurroundingTextChanged", false); 195 "onSurroundingTextChanged", false);
196 engine_handler->SetSurroundingText("text", // Surrounding text. 196 engine_handler->SetSurroundingText("text", // Surrounding text.
197 0, // focused position. 197 0, // focused position.
198 1); // anchor position. 198 1, // anchor position.
199 0); // offset position.
199 ASSERT_TRUE(surrounding_text_listener.WaitUntilSatisfied()); 200 ASSERT_TRUE(surrounding_text_listener.WaitUntilSatisfied());
200 ASSERT_TRUE(surrounding_text_listener.was_satisfied()); 201 ASSERT_TRUE(surrounding_text_listener.was_satisfied());
201 202
202 // onMenuItemActivated should be fired if PropertyActivate is called. 203 // onMenuItemActivated should be fired if PropertyActivate is called.
203 ExtensionTestMessageListener property_listener("onMenuItemActivated", false); 204 ExtensionTestMessageListener property_listener("onMenuItemActivated", false);
204 engine_handler->PropertyActivate("property_name"); 205 engine_handler->PropertyActivate("property_name");
205 ASSERT_TRUE(property_listener.WaitUntilSatisfied()); 206 ASSERT_TRUE(property_listener.WaitUntilSatisfied());
206 ASSERT_TRUE(property_listener.was_satisfied()); 207 ASSERT_TRUE(property_listener.was_satisfied());
207 208
208 // onReset should be fired if Reset is called. 209 // onReset should be fired if Reset is called.
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 } 986 }
986 } 987 }
987 988
988 IMEBridge::Get()->SetInputContextHandler(NULL); 989 IMEBridge::Get()->SetInputContextHandler(NULL);
989 IMEBridge::Get()->SetCandidateWindowHandler(NULL); 990 IMEBridge::Get()->SetCandidateWindowHandler(NULL);
990 } 991 }
991 992
992 } // namespace 993 } // namespace
993 } // namespace input_method 994 } // namespace input_method
994 } // namespace chromeos 995 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698