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

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

Issue 1326763003: Clean up the useless GetAttributedSubstringFromRange() and the related IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « content/browser/renderer_host/text_input_client_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a3c87b59e3ccd10deb5ed6676d27e1b557ef4434..57caf1d82fade5b30076f43e1f5bf4d0faf35fbe 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -204,37 +204,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
« no previous file with comments | « content/browser/renderer_host/text_input_client_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698