| OLD | NEW |
| 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/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO)); | 187 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO)); |
| 188 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO_INACTIVE)); | 188 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_FRAME_INCOGNITO_INACTIVE)); |
| 189 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_TAB_BACKGROUND_INCOGNITO)); | 189 EXPECT_FALSE(pack->HasCustomImage(IDR_THEME_TAB_BACKGROUND_INCOGNITO)); |
| 190 | 190 |
| 191 // Make sure we don't have phantom data. | 191 // Make sure we don't have phantom data. |
| 192 EXPECT_FALSE(pack->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND, | 192 EXPECT_FALSE(pack->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND, |
| 193 &color)); | 193 &color)); |
| 194 EXPECT_FALSE(pack->GetTint(ThemeProperties::TINT_FRAME, &actual)); | 194 EXPECT_FALSE(pack->GetTint(ThemeProperties::TINT_FRAME, &actual)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 MessageLoop message_loop; | 197 base::MessageLoop message_loop; |
| 198 content::TestBrowserThread fake_ui_thread; | 198 content::TestBrowserThread fake_ui_thread; |
| 199 content::TestBrowserThread fake_file_thread; | 199 content::TestBrowserThread fake_file_thread; |
| 200 | 200 |
| 201 scoped_refptr<BrowserThemePack> theme_pack_; | 201 scoped_refptr<BrowserThemePack> theme_pack_; |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 | 204 |
| 205 TEST_F(BrowserThemePackTest, DeriveUnderlineLinkColor) { | 205 TEST_F(BrowserThemePackTest, DeriveUnderlineLinkColor) { |
| 206 // If we specify a link color, but don't specify the underline color, the | 206 // If we specify a link color, but don't specify the underline color, the |
| 207 // theme provider should create one. | 207 // theme provider should create one. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 430 |
| 431 // Part 2: Try to read back the data pack that we just wrote to disk. | 431 // Part 2: Try to read back the data pack that we just wrote to disk. |
| 432 { | 432 { |
| 433 scoped_refptr<BrowserThemePack> pack = | 433 scoped_refptr<BrowserThemePack> pack = |
| 434 BrowserThemePack::BuildFromDataPack( | 434 BrowserThemePack::BuildFromDataPack( |
| 435 file, "mblmlcbknbnfebdfjnolmcapmdofhmme"); | 435 file, "mblmlcbknbnfebdfjnolmcapmdofhmme"); |
| 436 ASSERT_TRUE(pack.get()); | 436 ASSERT_TRUE(pack.get()); |
| 437 VerifyStarGazing(pack.get()); | 437 VerifyStarGazing(pack.get()); |
| 438 } | 438 } |
| 439 } | 439 } |
| OLD | NEW |