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

Side by Side Diff: chrome/browser/chromeos/status/clock_menu_button_browsertest.cc

Issue 7324017: Split SystemAccess into TimezoneSettings, StatisticsProvider, and SyslogsProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/status/clock_menu_button.h" 5 #include "chrome/browser/chromeos/status/clock_menu_button.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h" 8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "chrome/browser/chromeos/frame/browser_view.h" 9 #include "chrome/browser/chromeos/frame/browser_view.h"
10 #include "chrome/browser/chromeos/status/status_area_view.h" 10 #include "chrome/browser/chromeos/status/status_area_view.h"
11 #include "chrome/browser/chromeos/system_access.h" 11 #include "chrome/browser/chromeos/system/timezone_settings.h"
12 #include "chrome/browser/chromeos/view_ids.h" 12 #include "chrome/browser/chromeos/view_ids.h"
13 #include "chrome/browser/prefs/pref_member.h" 13 #include "chrome/browser/prefs/pref_member.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_window.h" 15 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/test/in_process_browser_test.h" 16 #include "chrome/test/in_process_browser_test.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "unicode/calendar.h" 18 #include "unicode/calendar.h"
19 #include "unicode/timezone.h" 19 #include "unicode/timezone.h"
20 20
21 namespace chromeos { 21 namespace chromeos {
(...skipping 13 matching lines...) Expand all
35 } 35 }
36 }; 36 };
37 37
38 IN_PROC_BROWSER_TEST_F(ClockMenuButtonTest, TimezoneTest) { 38 IN_PROC_BROWSER_TEST_F(ClockMenuButtonTest, TimezoneTest) {
39 ClockMenuButton* clock = GetClockMenuButton(); 39 ClockMenuButton* clock = GetClockMenuButton();
40 ASSERT_TRUE(clock != NULL); 40 ASSERT_TRUE(clock != NULL);
41 41
42 // Update timezone and make sure clock text changes. 42 // Update timezone and make sure clock text changes.
43 scoped_ptr<icu::TimeZone> timezone_first(icu::TimeZone::createTimeZone( 43 scoped_ptr<icu::TimeZone> timezone_first(icu::TimeZone::createTimeZone(
44 icu::UnicodeString::fromUTF8("Asia/Hong_Kong"))); 44 icu::UnicodeString::fromUTF8("Asia/Hong_Kong")));
45 SystemAccess::GetInstance()->SetTimezone(*timezone_first); 45 system::TimezoneSettings::GetInstance()->SetTimezone(*timezone_first);
46 std::wstring text_before = clock->text(); 46 std::wstring text_before = clock->text();
47 scoped_ptr<icu::TimeZone> timezone_second(icu::TimeZone::createTimeZone( 47 scoped_ptr<icu::TimeZone> timezone_second(icu::TimeZone::createTimeZone(
48 icu::UnicodeString::fromUTF8("Pacific/Samoa"))); 48 icu::UnicodeString::fromUTF8("Pacific/Samoa")));
49 SystemAccess::GetInstance()->SetTimezone(*timezone_second); 49 system::TimezoneSettings::GetInstance()->SetTimezone(*timezone_second);
50 std::wstring text_after = clock->text(); 50 std::wstring text_after = clock->text();
51 EXPECT_NE(text_before, text_after); 51 EXPECT_NE(text_before, text_after);
52 } 52 }
53 53
54 } // namespace chromeos 54 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/clock_menu_button.cc ('k') | chrome/browser/chromeos/system/mock_statistics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698