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

Side by Side Diff: chrome/browser/notifications/desktop_notifications_unittest.cc

Issue 3119035: FBTF: Move individual XXXMsg_Params structs to a new file. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix comment Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/notifications/desktop_notifications_unittest.h" 5 #include "chrome/browser/notifications/desktop_notifications_unittest.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/render_messages_params.h"
9 10
10 // static 11 // static
11 const int MockBalloonCollection::kMockBalloonSpace = 5; 12 const int MockBalloonCollection::kMockBalloonSpace = 5;
12 13
13 // static 14 // static
14 std::string DesktopNotificationsTest::log_output_; 15 std::string DesktopNotificationsTest::log_output_;
15 16
16 void MockBalloonCollection::Add(const Notification& notification, 17 void MockBalloonCollection::Add(const Notification& notification,
17 Profile* profile) { 18 Profile* profile) {
18 // Swap in the logging proxy for the purpose of logging calls that 19 // Swap in the logging proxy for the purpose of logging calls that
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 MessageLoopForUI::current()->RunAllPending(); 319 MessageLoopForUI::current()->RunAllPending();
319 EXPECT_EQ(1, balloon_collection_->count()); 320 EXPECT_EQ(1, balloon_collection_->count());
320 Balloon* balloon = (*balloon_collection_->balloons().begin()); 321 Balloon* balloon = (*balloon_collection_->balloons().begin());
321 GURL data_url = balloon->notification().content_url(); 322 GURL data_url = balloon->notification().content_url();
322 EXPECT_EQ(std::string::npos, data_url.spec().find("<script>")); 323 EXPECT_EQ(std::string::npos, data_url.spec().find("<script>"));
323 EXPECT_EQ(std::string::npos, data_url.spec().find("<i>")); 324 EXPECT_EQ(std::string::npos, data_url.spec().find("<i>"));
324 // URL-encoded versions of tags should also not be found. 325 // URL-encoded versions of tags should also not be found.
325 EXPECT_EQ(std::string::npos, data_url.spec().find("%3cscript%3e")); 326 EXPECT_EQ(std::string::npos, data_url.spec().find("%3cscript%3e"));
326 EXPECT_EQ(std::string::npos, data_url.spec().find("%3ci%3e")); 327 EXPECT_EQ(std::string::npos, data_url.spec().find("%3ci%3e"));
327 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698