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

Side by Side Diff: content/browser/webui/web_ui_message_handler_unittest.cc

Issue 16408017: Use a direct include of utf_string_conversions.h in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
OLDNEW
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 "content/public/browser/web_ui_message_handler.h" 5 #include "content/public/browser/web_ui_message_handler.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 TEST(WebUIMessageHandlerTest, ExtractIntegerValue) { 14 TEST(WebUIMessageHandlerTest, ExtractIntegerValue) {
15 ListValue list; 15 ListValue list;
16 int value, zero_value = 0, neg_value = -1234, pos_value = 1234; 16 int value, zero_value = 0, neg_value = -1234, pos_value = 1234;
17 string16 zero_string(UTF8ToUTF16("0")); 17 string16 zero_string(UTF8ToUTF16("0"));
18 string16 neg_string(UTF8ToUTF16("-1234")); 18 string16 neg_string(UTF8ToUTF16("-1234"));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 TEST(WebUIMessageHandlerTest, ExtractStringValue) { 88 TEST(WebUIMessageHandlerTest, ExtractStringValue) {
89 base::ListValue list; 89 base::ListValue list;
90 string16 in_string(UTF8ToUTF16( 90 string16 in_string(UTF8ToUTF16(
91 "The facts, though interesting, are irrelevant.")); 91 "The facts, though interesting, are irrelevant."));
92 list.Append(new base::StringValue(in_string)); 92 list.Append(new base::StringValue(in_string));
93 string16 out_string = WebUIMessageHandler::ExtractStringValue(&list); 93 string16 out_string = WebUIMessageHandler::ExtractStringValue(&list);
94 EXPECT_EQ(in_string, out_string); 94 EXPECT_EQ(in_string, out_string);
95 } 95 }
96 96
97 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_message_handler.cc ('k') | content/browser/worker_host/test/worker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698