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

Side by Side Diff: content/browser/intents/internal_web_intents_dispatcher_unittest.cc

Issue 9838009: Clean up a few TODO items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "content/browser/intents/intent_injector.h" 7 #include "content/browser/intents/intent_injector.h"
8 #include "content/browser/intents/internal_web_intents_dispatcher.h" 8 #include "content/browser/intents/internal_web_intents_dispatcher.h"
9 #include "content/browser/renderer_host/test_render_view_host.h" 9 #include "content/browser/renderer_host/test_render_view_host.h"
10 #include "content/browser/tab_contents/test_tab_contents.h" 10 #include "content/browser/tab_contents/test_tab_contents.h"
11 #include "webkit/glue/web_intent_data.h" 11 #include "webkit/glue/web_intent_data.h"
12 #include "webkit/glue/web_intent_reply_data.h" 12 #include "webkit/glue/web_intent_reply_data.h"
13 13
14 class InternalWebIntentsDispatcherTest : public RenderViewHostTestHarness { 14 class InternalWebIntentsDispatcherTest
15 : public content::RenderViewHostTestHarness {
15 public: 16 public:
16 InternalWebIntentsDispatcherTest() { 17 InternalWebIntentsDispatcherTest() {
17 replied_ = 0; 18 replied_ = 0;
18 } 19 }
19 20
20 ~InternalWebIntentsDispatcherTest() {} 21 ~InternalWebIntentsDispatcherTest() {}
21 22
22 void NotifyReply(webkit_glue::WebIntentReplyType reply_type, 23 void NotifyReply(webkit_glue::WebIntentReplyType reply_type,
23 const string16& data) { 24 const string16& data) {
24 notified_reply_type_ = reply_type; 25 notified_reply_type_ = reply_type;
(...skipping 25 matching lines...) Expand all
50 51
51 dispatcher->DispatchIntent(web_contents()); 52 dispatcher->DispatchIntent(web_contents());
52 53
53 dispatcher->SendReplyMessage(webkit_glue::WEB_INTENT_REPLY_SUCCESS, 54 dispatcher->SendReplyMessage(webkit_glue::WEB_INTENT_REPLY_SUCCESS,
54 ASCIIToUTF16("success")); 55 ASCIIToUTF16("success"));
55 56
56 EXPECT_EQ(ASCIIToUTF16("success"), notified_data_); 57 EXPECT_EQ(ASCIIToUTF16("success"), notified_data_);
57 EXPECT_EQ(1, replied_); 58 EXPECT_EQ(1, replied_);
58 EXPECT_EQ(webkit_glue::WEB_INTENT_REPLY_SUCCESS, notified_reply_type_); 59 EXPECT_EQ(webkit_glue::WEB_INTENT_REPLY_SUCCESS, notified_reply_type_);
59 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698