| OLD | NEW |
| 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "content/browser/intents/intent_injector.h" | 8 #include "content/browser/intents/intent_injector.h" |
| 9 #include "content/browser/intents/internal_web_intents_dispatcher.h" | 9 #include "content/browser/intents/internal_web_intents_dispatcher.h" |
| 10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 ASCIIToUTF16("type"), | 62 ASCIIToUTF16("type"), |
| 63 ASCIIToUTF16("unserialized_data")); | 63 ASCIIToUTF16("unserialized_data")); |
| 64 InternalWebIntentsDispatcher* dispatcher = new InternalWebIntentsDispatcher( | 64 InternalWebIntentsDispatcher* dispatcher = new InternalWebIntentsDispatcher( |
| 65 intent, base::Bind(&InternalWebIntentsDispatcherTest::NotifyReply, | 65 intent, base::Bind(&InternalWebIntentsDispatcherTest::NotifyReply, |
| 66 base::Unretained(this))); | 66 base::Unretained(this))); |
| 67 dispatcher->DispatchIntent(web_contents()); | 67 dispatcher->DispatchIntent(web_contents()); |
| 68 EXPECT_FALSE(dispatcher->intent_injector_ == NULL); | 68 EXPECT_FALSE(dispatcher->intent_injector_ == NULL); |
| 69 dispatcher->ResetDispatch(); | 69 dispatcher->ResetDispatch(); |
| 70 EXPECT_TRUE(dispatcher->intent_injector_ == NULL); | 70 EXPECT_TRUE(dispatcher->intent_injector_ == NULL); |
| 71 | 71 |
| 72 dispatcher->SendReplyMessage(webkit_glue::WEB_INTENT_REPLY_SUCCESS, | 72 dispatcher->SendReply(webkit_glue::WebIntentReply( |
| 73 ASCIIToUTF16("success")); | 73 webkit_glue::WEB_INTENT_REPLY_SUCCESS, ASCIIToUTF16("success"))); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace content | 76 } // namespace content |
| OLD | NEW |