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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_message_filter_mac_unittest.cc

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). Created 7 years, 1 month 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" 5 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/spellcheck_messages.h" 8 #include "chrome/common/spellcheck_messages.h"
9 #include "chrome/common/spellcheck_result.h" 9 #include "chrome/common/spellcheck_result.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 TEST(SpellCheckMessageFilterMacTest, TestOverrideThread) { 46 TEST(SpellCheckMessageFilterMacTest, TestOverrideThread) {
47 static const uint32 kSpellcheckMessages[] = { 47 static const uint32 kSpellcheckMessages[] = {
48 SpellCheckHostMsg_RequestTextCheck::ID, 48 SpellCheckHostMsg_RequestTextCheck::ID,
49 }; 49 };
50 scoped_refptr<SpellCheckMessageFilterMac> filter( 50 scoped_refptr<SpellCheckMessageFilterMac> filter(
51 new SpellCheckMessageFilterMac(0)); 51 new SpellCheckMessageFilterMac(0));
52 content::BrowserThread::ID thread; 52 content::BrowserThread::ID thread;
53 IPC::Message message; 53 IPC::Message message;
54 for (size_t i = 0; i < arraysize(kSpellcheckMessages); ++i) { 54 for (size_t i = 0; i < arraysize(kSpellcheckMessages); ++i) {
55 message.SetHeaderValues(0, kSpellcheckMessages[i], 0 /* flags */); 55 message.SetHeaderValues(
56 0, kSpellcheckMessages[i], IPC::Message::PRIORITY_NORMAL);
56 thread = content::BrowserThread::IO; 57 thread = content::BrowserThread::IO;
57 filter->OverrideThreadForMessage(message, &thread); 58 filter->OverrideThreadForMessage(message, &thread);
58 EXPECT_EQ(content::BrowserThread::UI, thread); 59 EXPECT_EQ(content::BrowserThread::UI, thread);
59 } 60 }
60 } 61 }
61 62
62 } // namespace 63 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698