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

Side by Side Diff: webkit/glue/web_intent_reply_data_unittest.cc

Issue 12340107: Remove some more web intents code I missed previously (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: cros Created 7 years, 9 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 | « webkit/glue/web_intent_reply_data.cc ('k') | webkit/glue/web_intent_service_data.h » ('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 <string>
6
7 #include "base/utf_string_conversions.h"
8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "webkit/glue/web_intent_reply_data.h"
11
12 using webkit_glue::WebIntentReply;
13
14 namespace {
15
16 TEST(WebIntentReplyDataTest, DefaultValues) {
17 WebIntentReply reply;
18 EXPECT_EQ(webkit_glue::WEB_INTENT_REPLY_INVALID, reply.type);
19 EXPECT_EQ(string16(), reply.data);
20 EXPECT_EQ(base::FilePath(), reply.data_file);
21 EXPECT_EQ(-1, reply.data_file_size);
22 }
23
24 TEST(WebIntentReplyDataTest, Equality) {
25 WebIntentReply data_a(
26 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
27 ASCIIToUTF16("poodles"));
28
29 WebIntentReply data_b(
30 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
31 ASCIIToUTF16("poodles"));
32
33 WebIntentReply data_c(
34 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
35 ASCIIToUTF16("hamfancy"));
36
37 EXPECT_EQ(data_a, data_b);
38 EXPECT_FALSE(data_a == data_c || data_b == data_c);
39
40 WebIntentReply file_a(
41 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
42 base::FilePath(),
43 22);
44
45 WebIntentReply file_b(
46 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
47 base::FilePath(),
48 22);
49
50 WebIntentReply file_c(
51 webkit_glue::WEB_INTENT_REPLY_SUCCESS,
52 base::FilePath(),
53 17);
54
55 EXPECT_EQ(file_a, file_b);
56 EXPECT_FALSE(file_a == file_c || file_b == file_c);
57 }
58
59 } // namespace
OLDNEW
« no previous file with comments | « webkit/glue/web_intent_reply_data.cc ('k') | webkit/glue/web_intent_service_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698