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

Side by Side Diff: chrome/browser/task_manager/task_manager_notification_browsertest.cc

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 "chrome/browser/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/notifications/desktop_notification_service.h" 10 #include "chrome/browser/notifications/desktop_notification_service.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Show the task manager. 55 // Show the task manager.
56 chrome::ShowTaskManager(browser()); 56 chrome::ShowTaskManager(browser());
57 // Expect to see the browser and the New Tab Page renderer. 57 // Expect to see the browser and the New Tab Page renderer.
58 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); 58 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
59 59
60 // Show a notification. 60 // Show a notification.
61 NotificationUIManager* notifications = 61 NotificationUIManager* notifications =
62 g_browser_process->notification_ui_manager(); 62 g_browser_process->notification_ui_manager();
63 63
64 base::string16 content = DesktopNotificationService::CreateDataUrl( 64 base::string16 content = DesktopNotificationService::CreateDataUrl(
65 GURL(), ASCIIToUTF16("Hello World!"), base::string16(), 65 GURL(), base::ASCIIToUTF16("Hello World!"), base::string16(),
66 blink::WebTextDirectionDefault); 66 blink::WebTextDirectionDefault);
67 67
68 scoped_refptr<NotificationDelegate> del1(new MockNotificationDelegate("n1")); 68 scoped_refptr<NotificationDelegate> del1(new MockNotificationDelegate("n1"));
69 Notification n1( 69 Notification n1(
70 GURL(), GURL(content), ASCIIToUTF16("Test 1"), base::string16(), 70 GURL(), GURL(content), base::ASCIIToUTF16("Test 1"), base::string16(),
71 del1.get()); 71 del1.get());
72 scoped_refptr<NotificationDelegate> del2(new MockNotificationDelegate("n2")); 72 scoped_refptr<NotificationDelegate> del2(new MockNotificationDelegate("n2"));
73 Notification n2( 73 Notification n2(
74 GURL(), GURL(content), ASCIIToUTF16("Test 2"), base::string16(), 74 GURL(), GURL(content), base::ASCIIToUTF16("Test 2"), base::string16(),
75 del2.get()); 75 del2.get());
76 76
77 notifications->Add(n1, browser()->profile()); 77 notifications->Add(n1, browser()->profile());
78 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); 78 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2);
79 notifications->Add(n2, browser()->profile()); 79 notifications->Add(n2, browser()->profile());
80 TaskManagerBrowserTestUtil::WaitForWebResourceChange(3); 80 TaskManagerBrowserTestUtil::WaitForWebResourceChange(3);
81 notifications->CancelById(n1.notification_id()); 81 notifications->CancelById(n1.notification_id());
82 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); 82 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2);
83 notifications->CancelById(n2.notification_id()); 83 notifications->CancelById(n2.notification_id());
84 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); 84 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
85 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.cc ('k') | chrome/browser/task_manager/task_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698