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

Unified Diff: content/browser/renderer_host/text_input_client_mac_unittest.mm

Issue 1313553006: Implement "Look Up In Dictionary" context menu item asynchronously. (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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/text_input_client_mac_unittest.mm
diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm
index 2479255ba1c0ae30221d5bca85a5d31380a2500c..8eb095b6dc34e36a74000f502cb0cd6045151de2 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -201,37 +201,4 @@ TEST_F(TextInputClientMacTest, TimeoutRectForRange) {
EXPECT_NSEQ(NSZeroRect, rect);
}
-TEST_F(TextInputClientMacTest, GetSubstring) {
- ScopedTestingThread thread(this);
- NSDictionary* attributes =
- [NSDictionary dictionaryWithObject:[NSColor purpleColor]
- forKey:NSForegroundColorAttributeName];
- base::scoped_nsobject<NSMutableAttributedString> kSuccessValue(
- [[NSMutableAttributedString alloc]
- initWithString:@"Barney is a purple dinosaur"
- attributes:attributes]);
-
- PostTask(FROM_HERE,
- base::Bind(&TextInputClientMac::SetSubstringAndSignal,
- base::Unretained(service()),
- base::Unretained(kSuccessValue.get())));
- NSAttributedString* string = service()->GetAttributedSubstringFromRange(
- widget(), NSMakeRange(0, 32));
-
- EXPECT_NSEQ(kSuccessValue, string);
- EXPECT_NE(kSuccessValue.get(), string); // |string| should be a copy.
- EXPECT_EQ(1U, ipc_sink().message_count());
- EXPECT_TRUE(ipc_sink().GetUniqueMessageMatching(
- TextInputClientMsg_StringForRange::ID));
-}
-
-TEST_F(TextInputClientMacTest, TimeoutSubstring) {
- NSAttributedString* string = service()->GetAttributedSubstringFromRange(
- widget(), NSMakeRange(0, 32));
- EXPECT_EQ(nil, string);
- EXPECT_EQ(1U, ipc_sink().message_count());
- EXPECT_TRUE(ipc_sink().GetUniqueMessageMatching(
- TextInputClientMsg_StringForRange::ID));
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698