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 "chrome/browser/google_apis/gdata_wapi_parser.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_parser.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 EXPECT_EQ("https://file_link_parent/", file_parent_link->href().spec()); | 154 EXPECT_EQ("https://file_link_parent/", file_parent_link->href().spec()); |
155 EXPECT_EQ("application/atom+xml", file_parent_link->mime_type()); | 155 EXPECT_EQ("application/atom+xml", file_parent_link->mime_type()); |
156 EXPECT_EQ(ASCIIToUTF16("Medical"), file_parent_link->title()); | 156 EXPECT_EQ(ASCIIToUTF16("Medical"), file_parent_link->title()); |
157 const Link* file_open_with_link = | 157 const Link* file_open_with_link = |
158 file_entry->GetLinkByType(Link::LINK_OPEN_WITH); | 158 file_entry->GetLinkByType(Link::LINK_OPEN_WITH); |
159 ASSERT_TRUE(file_open_with_link); | 159 ASSERT_TRUE(file_open_with_link); |
160 EXPECT_EQ("https://xml_file_entry_open_with_link/", | 160 EXPECT_EQ("https://xml_file_entry_open_with_link/", |
161 file_open_with_link->href().spec()); | 161 file_open_with_link->href().spec()); |
162 EXPECT_EQ("application/atom+xml", file_open_with_link->mime_type()); | 162 EXPECT_EQ("application/atom+xml", file_open_with_link->mime_type()); |
163 EXPECT_EQ("the_app_id", file_open_with_link->app_id()); | 163 EXPECT_EQ("the_app_id", file_open_with_link->app_id()); |
| 164 EXPECT_EQ(654321, file_open_with_link->changestamp()); |
164 | 165 |
165 const Link* file_unknown_link = file_entry->GetLinkByType(Link::LINK_UNKNOWN); | 166 const Link* file_unknown_link = file_entry->GetLinkByType(Link::LINK_UNKNOWN); |
166 ASSERT_TRUE(file_unknown_link); | 167 ASSERT_TRUE(file_unknown_link); |
167 EXPECT_EQ("https://xml_file_fake_entry_open_with_link/", | 168 EXPECT_EQ("https://xml_file_fake_entry_open_with_link/", |
168 file_unknown_link->href().spec()); | 169 file_unknown_link->href().spec()); |
169 EXPECT_EQ("application/atom+xml", file_unknown_link->mime_type()); | 170 EXPECT_EQ("application/atom+xml", file_unknown_link->mime_type()); |
170 EXPECT_EQ("", file_unknown_link->app_id()); | 171 EXPECT_EQ("", file_unknown_link->app_id()); |
171 | 172 |
172 // Check a file entry. | 173 // Check a file entry. |
173 const DocumentEntry* document_entry = feed->entries()[2]; | 174 const DocumentEntry* document_entry = feed->entries()[2]; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_EXTERNAL_APP)); | 388 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_EXTERNAL_APP)); |
388 EXPECT_EQ(DocumentEntry::KIND_OF_FOLDER, | 389 EXPECT_EQ(DocumentEntry::KIND_OF_FOLDER, |
389 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_FOLDER)); | 390 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_FOLDER)); |
390 EXPECT_EQ(DocumentEntry::KIND_OF_FILE, | 391 EXPECT_EQ(DocumentEntry::KIND_OF_FILE, |
391 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_FILE)); | 392 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_FILE)); |
392 EXPECT_EQ(DocumentEntry::KIND_OF_FILE, | 393 EXPECT_EQ(DocumentEntry::KIND_OF_FILE, |
393 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_PDF)); | 394 DocumentEntry::ClassifyEntryKind(ENTRY_KIND_PDF)); |
394 } | 395 } |
395 | 396 |
396 } // namespace google_apis | 397 } // namespace google_apis |
OLD | NEW |