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

Side by Side Diff: chrome/browser/web_resource/web_resource_service_unittest.cc

Issue 5648001: Mark WebResourceServiceTest.UnpackPromoSignal as DISABLED_, as it's crashing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/web_resource/web_resource_service.h" 10 #include "chrome/browser/web_resource/web_resource_service.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 base::JSONReader::Read(json, false))); 87 base::JSONReader::Read(json, false)));
88 88
89 // Check that prefs are set correctly. 89 // Check that prefs are set correctly.
90 web_resource_service->UnpackLogoSignal(*(test_json.get())); 90 web_resource_service->UnpackLogoSignal(*(test_json.get()));
91 logo_start = profile.GetPrefs()->GetReal(prefs::kNTPCustomLogoStart); 91 logo_start = profile.GetPrefs()->GetReal(prefs::kNTPCustomLogoStart);
92 ASSERT_EQ(logo_start, 0); // date value reset to 0; 92 ASSERT_EQ(logo_start, 0); // date value reset to 0;
93 logo_end = profile.GetPrefs()->GetReal(prefs::kNTPCustomLogoEnd); 93 logo_end = profile.GetPrefs()->GetReal(prefs::kNTPCustomLogoEnd);
94 ASSERT_EQ(logo_end, 0); // date value reset to 0; 94 ASSERT_EQ(logo_end, 0); // date value reset to 0;
95 } 95 }
96 96
97 TEST_F(WebResourceServiceTest, UnpackPromoSignal) { 97 // Crashing. See http://crbug.com/65462.
98 TEST_F(WebResourceServiceTest, DISABLED_UnpackPromoSignal) {
98 // Set up a testing profile and create a web resource service. 99 // Set up a testing profile and create a web resource service.
99 TestingProfile profile; 100 TestingProfile profile;
100 scoped_refptr<WebResourceService> web_resource_service( 101 scoped_refptr<WebResourceService> web_resource_service(
101 new WebResourceService(&profile)); 102 new WebResourceService(&profile));
102 103
103 // Set up start and end dates and promo line in a Dictionary as if parsed 104 // Set up start and end dates and promo line in a Dictionary as if parsed
104 // from the service. 105 // from the service.
105 std::string json = "{ " 106 std::string json = "{ "
106 " \"topic\": {" 107 " \"topic\": {"
107 " \"answers\": [" 108 " \"answers\": ["
(...skipping 17 matching lines...) Expand all
125 double promo_start = 126 double promo_start =
126 profile.GetPrefs()->GetReal(prefs::kNTPPromoStart); 127 profile.GetPrefs()->GetReal(prefs::kNTPPromoStart);
127 ASSERT_EQ(promo_start, 1264899600); // unix epoch for Jan 31 2010 0100 GMT. 128 ASSERT_EQ(promo_start, 1264899600); // unix epoch for Jan 31 2010 0100 GMT.
128 double promo_end = 129 double promo_end =
129 profile.GetPrefs()->GetReal(prefs::kNTPPromoEnd); 130 profile.GetPrefs()->GetReal(prefs::kNTPPromoEnd);
130 ASSERT_EQ(promo_end, 1327971600); // unix epoch for Jan 31 2012 0100 GMT. 131 ASSERT_EQ(promo_end, 1327971600); // unix epoch for Jan 31 2012 0100 GMT.
131 std::string promo_line = profile.GetPrefs()->GetString(prefs::kNTPPromoLine); 132 std::string promo_line = profile.GetPrefs()->GetString(prefs::kNTPPromoLine);
132 ASSERT_EQ(promo_line, "Eat more pie!"); 133 ASSERT_EQ(promo_line, "Eat more pie!");
133 } 134 }
134 135
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