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

Side by Side Diff: content/renderer/date_time_formatter_unittest.cc

Issue 17573002: Disable failing week-of-year test in RendererDateTimePickerTest.TestParserValidDateInputs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <map> 5 #include <map>
6 6
7 #include "content/renderer/date_time_formatter.h" 7 #include "content/renderer/date_time_formatter.h"
8 #include "content/renderer/renderer_date_time_picker.h" 8 #include "content/renderer/renderer_date_time_picker.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h" 10 #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 TEST(RendererDateTimePickerTest, TestParserValidDateInputs) { 132 TEST(RendererDateTimePickerTest, TestParserValidDateInputs) {
133 DateTimeFormatter sut(ui::TEXT_INPUT_TYPE_MONTH, 2012, 11, 1, 0, 0, 0, 0, 0); 133 DateTimeFormatter sut(ui::TEXT_INPUT_TYPE_MONTH, 2012, 11, 1, 0, 0, 0, 0, 0);
134 EXPECT_EQ("2012-12", sut.GetFormattedValue()); 134 EXPECT_EQ("2012-12", sut.GetFormattedValue());
135 135
136 136
137 DateTimeFormatter sut2(ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL, 137 DateTimeFormatter sut2(ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL,
138 2013, 3, 23, 15, 47, 0, 0, 0); 138 2013, 3, 23, 15, 47, 0, 0, 0);
139 EXPECT_EQ("2013-04-23T15:47", sut2.GetFormattedValue()); 139 EXPECT_EQ("2013-04-23T15:47", sut2.GetFormattedValue());
140 140
141 DateTimeFormatter sut3(ui::TEXT_INPUT_TYPE_WEEK, 0, 0, 0, 0, 0, 0, 2012, 2); 141 // Disabling this case due to crbug.com/253231
142 EXPECT_EQ("2012-W02", sut3.GetFormattedValue()); 142 //DateTimeFormatter sut3(ui::TEXT_INPUT_TYPE_WEEK, 0, 0, 0, 0, 0, 0, 2012, 2);
143 //EXPECT_EQ("2012-W02", sut3.GetFormattedValue());
143 } 144 }
144 145
145 TEST(RendererDateTimePickerTest, TestParserInvalidDateInputs) { 146 TEST(RendererDateTimePickerTest, TestParserInvalidDateInputs) {
146 DateTimeFormatter sut(ui::TEXT_INPUT_TYPE_WEEK, 0, 0, 0, 0, 0, 0, 0, 0); 147 DateTimeFormatter sut(ui::TEXT_INPUT_TYPE_WEEK, 0, 0, 0, 0, 0, 0, 0, 0);
147 EXPECT_EQ("", sut.GetFormattedValue()); 148 EXPECT_EQ("", sut.GetFormattedValue());
148 149
149 DateTimeFormatter sut2(ui::TEXT_INPUT_TYPE_NONE, 2013, 3, 23, 0, 0, 0, 0, 0); 150 DateTimeFormatter sut2(ui::TEXT_INPUT_TYPE_NONE, 2013, 3, 23, 0, 0, 0, 0, 0);
150 EXPECT_EQ("", sut2.GetFormattedValue()); 151 EXPECT_EQ("", sut2.GetFormattedValue());
151 152
152 DateTimeFormatter sut3(ui::TEXT_INPUT_TYPE_NONE, 2013, 14, 32, 0, 0, 0, 0, 0); 153 DateTimeFormatter sut3(ui::TEXT_INPUT_TYPE_NONE, 2013, 14, 32, 0, 0, 0, 0, 0);
153 EXPECT_EQ("", sut3.GetFormattedValue()); 154 EXPECT_EQ("", sut3.GetFormattedValue());
154 155
155 DateTimeFormatter sut4(ui::TEXT_INPUT_TYPE_DATE, 0, 0, 0, 0, 0, 0, 0, 0); 156 DateTimeFormatter sut4(ui::TEXT_INPUT_TYPE_DATE, 0, 0, 0, 0, 0, 0, 0, 0);
156 EXPECT_EQ("", sut4.GetFormattedValue()); 157 EXPECT_EQ("", sut4.GetFormattedValue());
157 158
158 DateTimeFormatter sut5(ui::TEXT_INPUT_TYPE_TIME, 0, 0, 0, 0, 0, 0, 0, 0); 159 DateTimeFormatter sut5(ui::TEXT_INPUT_TYPE_TIME, 0, 0, 0, 0, 0, 0, 0, 0);
159 EXPECT_EQ("", sut5.GetFormattedValue()); 160 EXPECT_EQ("", sut5.GetFormattedValue());
160 161
161 DateTimeFormatter sut6(ui::TEXT_INPUT_TYPE_PASSWORD, 23, 0, 0, 0, 5, 0, 0, 0); 162 DateTimeFormatter sut6(ui::TEXT_INPUT_TYPE_PASSWORD, 23, 0, 0, 0, 5, 0, 0, 0);
162 EXPECT_EQ("", sut6.GetFormattedValue()); 163 EXPECT_EQ("", sut6.GetFormattedValue());
163 164
164 DateTimeFormatter sut7(ui::TEXT_INPUT_TYPE_MAX, 23, 0, 0, 0, 5, 0, 0, 0); 165 DateTimeFormatter sut7(ui::TEXT_INPUT_TYPE_MAX, 23, 0, 0, 0, 5, 0, 0, 0);
165 EXPECT_EQ("", sut7.GetFormattedValue()); 166 EXPECT_EQ("", sut7.GetFormattedValue());
166 167
167 DateTimeFormatter sut8( 168 DateTimeFormatter sut8(
168 static_cast<ui::TextInputType>(10000), 23, 0, 0, 0, 5, 0, 0, 0); 169 static_cast<ui::TextInputType>(10000), 23, 0, 0, 0, 5, 0, 0, 0);
169 EXPECT_EQ("", sut8.GetFormattedValue()); 170 EXPECT_EQ("", sut8.GetFormattedValue());
170 } 171 }
171 } // namespace content 172 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698