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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_files_unittest.cc

Issue 10857063: gdata: Remove logic to detect incompatibility proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/gdata/gdata_files.h"
6
7 #include "chrome/browser/chromeos/gdata/gdata.pb.h"
8 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace gdata {
12 namespace {
13
14 const char kResumableEditMediaUrl[] = "http://resumable-edit-media/";
15
16 }
17
18 TEST(GDataEntryTest, FromProto_DetectBadUploadUrl) {
19 GDataEntryProto proto;
20 proto.set_title("test.txt");
21
22 GDataDirectoryService directory_service;
23
24 scoped_ptr<GDataEntry> entry(directory_service.CreateGDataFile());
25 // This should fail as the upload URL is empty.
26 ASSERT_FALSE(entry->FromProto(proto));
27
28 // Set a upload URL.
29 proto.set_upload_url(kResumableEditMediaUrl);
30
31 // This should succeed as the upload URL is set.
32 ASSERT_TRUE(entry->FromProto(proto));
33 EXPECT_EQ(kResumableEditMediaUrl, entry->upload_url().spec());
34 }
35
36 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698