| 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/gtest_prod_util.h" | 5 #include "base/gtest_prod_util.h" |
| 6 #include "base/values.h" | 6 #include "base/values.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "content/common/intents_messages.h" | 8 #include "content/common/intents_messages.h" |
| 9 #include "content/public/renderer/v8_value_converter.h" | 9 #include "content/public/renderer/v8_value_converter.h" |
| 10 #include "content/public/test/render_view_test.h" | 10 #include "content/public/test/render_view_test.h" |
| 11 #include "content/renderer/render_view_impl.h" | 11 #include "content/renderer/render_view_impl.h" |
| 12 #include "content/renderer/web_intents_host.h" | 12 #include "content/renderer/web_intents_host.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeliveredIntentCli
ent.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeliveredIntentCli
ent.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 15 #include "webkit/glue/web_intent_data.h" | 15 #include "webkit/glue/web_intent_data.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class WebIntentsHostTest : public RenderViewTest { | 19 class WebIntentsHostTest : public RenderViewTest { |
| 20 protected: | 20 protected: |
| 21 RenderViewImpl* view() { return static_cast<RenderViewImpl*>(view_); } | 21 RenderViewImpl* view() { return static_cast<RenderViewImpl*>(view_); } |
| 22 WebIntentsHost* web_intents_host() { return view()->intents_host_; } | 22 WebIntentsHost* web_intents_host() { return view()->intents_host_; } |
| 23 | 23 |
| 24 void SetIntentData(const webkit_glue::WebIntentData& data) { | 24 void SetIntentData(const webkit_glue::WebIntentData& data) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 EXPECT_EQ("val1", val1); | 114 EXPECT_EQ("val1", val1); |
| 115 | 115 |
| 116 base::DictionaryValue* v2 = NULL; | 116 base::DictionaryValue* v2 = NULL; |
| 117 ASSERT_TRUE(payload->GetDictionary(1, &v2)); | 117 ASSERT_TRUE(payload->GetDictionary(1, &v2)); |
| 118 std::string val2; | 118 std::string val2; |
| 119 v2->GetStringASCII(std::string("key2"), &val2); | 119 v2->GetStringASCII(std::string("key2"), &val2); |
| 120 EXPECT_EQ("val2", val2); | 120 EXPECT_EQ("val2", val2); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace content | 123 } // namespace content |
| OLD | NEW |