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

Side by Side Diff: chrome/browser/themes/browser_theme_pack_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO)); 198 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO));
199 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO_INACTIVE)); 199 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO_INACTIVE));
200 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_TAB_BACKGROUND_INCOGNITO)); 200 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_TAB_BACKGROUND_INCOGNITO));
201 201
202 // Make sure we don't have phantom data. 202 // Make sure we don't have phantom data.
203 EXPECT_FALSE(pack->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND, 203 EXPECT_FALSE(pack->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND,
204 &color)); 204 &color));
205 EXPECT_FALSE(pack->GetTint(ThemeProperties::TINT_FRAME, &actual)); 205 EXPECT_FALSE(pack->GetTint(ThemeProperties::TINT_FRAME, &actual));
206 } 206 }
207 207
208 MessageLoop message_loop; 208 base::MessageLoop message_loop;
209 content::TestBrowserThread fake_ui_thread; 209 content::TestBrowserThread fake_ui_thread;
210 content::TestBrowserThread fake_file_thread; 210 content::TestBrowserThread fake_file_thread;
211 211
212 scoped_refptr<BrowserThemePack> theme_pack_; 212 scoped_refptr<BrowserThemePack> theme_pack_;
213 }; 213 };
214 214
215 215
216 TEST_F(BrowserThemePackTest, DeriveUnderlineLinkColor) { 216 TEST_F(BrowserThemePackTest, DeriveUnderlineLinkColor) {
217 // If we specify a link color, but don't specify the underline color, the 217 // If we specify a link color, but don't specify the underline color, the
218 // theme provider should create one. 218 // theme provider should create one.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 // Part 2: Try to read back the data pack that we just wrote to disk. 442 // Part 2: Try to read back the data pack that we just wrote to disk.
443 { 443 {
444 scoped_refptr<BrowserThemePack> pack = 444 scoped_refptr<BrowserThemePack> pack =
445 BrowserThemePack::BuildFromDataPack( 445 BrowserThemePack::BuildFromDataPack(
446 file, "mblmlcbknbnfebdfjnolmcapmdofhmme"); 446 file, "mblmlcbknbnfebdfjnolmcapmdofhmme");
447 ASSERT_TRUE(pack.get()); 447 ASSERT_TRUE(pack.get());
448 VerifyStarGazing(pack.get()); 448 VerifyStarGazing(pack.get());
449 } 449 }
450 } 450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698