OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/intents/web_intent_service_data.h" | |
12 #include "chrome/browser/webdata/web_database.h" | 11 #include "chrome/browser/webdata/web_database.h" |
13 #include "chrome/browser/webdata/web_intents_table.h" | 12 #include "chrome/browser/webdata/web_intents_table.h" |
14 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
15 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "webkit/glue/web_intent_service_data.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 GURL test_url("http://google.com/"); | 20 GURL test_url("http://google.com/"); |
21 string16 test_action = ASCIIToUTF16("http://webintents.org/intents/share"); | 21 string16 test_action = ASCIIToUTF16("http://webintents.org/intents/share"); |
22 string16 test_action_2 = ASCIIToUTF16("http://webintents.org/intents/view"); | 22 string16 test_action_2 = ASCIIToUTF16("http://webintents.org/intents/view"); |
23 string16 test_title = ASCIIToUTF16("Test WebIntent"); | 23 string16 test_title = ASCIIToUTF16("Test WebIntent"); |
24 string16 test_title_2 = ASCIIToUTF16("Test WebIntent #2"); | 24 string16 test_title_2 = ASCIIToUTF16("Test WebIntent #2"); |
25 string16 mime_image = ASCIIToUTF16("image/*"); | 25 string16 mime_image = ASCIIToUTF16("image/*"); |
26 string16 mime_video = ASCIIToUTF16("video/*"); | 26 string16 mime_video = ASCIIToUTF16("video/*"); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 EXPECT_TRUE(IntentsTable()->GetAllWebIntents(&intents)); | 148 EXPECT_TRUE(IntentsTable()->GetAllWebIntents(&intents)); |
149 ASSERT_EQ(2U, intents.size()); | 149 ASSERT_EQ(2U, intents.size()); |
150 | 150 |
151 if (intents[0].disposition == WebIntentServiceData::DISPOSITION_WINDOW) | 151 if (intents[0].disposition == WebIntentServiceData::DISPOSITION_WINDOW) |
152 std::swap(intents[0], intents[1]); | 152 std::swap(intents[0], intents[1]); |
153 | 153 |
154 EXPECT_EQ(WebIntentServiceData::DISPOSITION_INLINE, intents[0].disposition); | 154 EXPECT_EQ(WebIntentServiceData::DISPOSITION_INLINE, intents[0].disposition); |
155 EXPECT_EQ(WebIntentServiceData::DISPOSITION_WINDOW, intents[1].disposition); | 155 EXPECT_EQ(WebIntentServiceData::DISPOSITION_WINDOW, intents[1].disposition); |
156 } | 156 } |
157 } // namespace | 157 } // namespace |
OLD | NEW |