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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_theme_source_unittest.cc

Issue 243076: Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gfx/png_encoder.h"
6 #include "chrome/browser/browser_theme_provider.h" 5 #include "chrome/browser/browser_theme_provider.h"
7 #include "chrome/browser/dom_ui/dom_ui_theme_source.h" 6 #include "chrome/browser/dom_ui/dom_ui_theme_source.h"
8 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
9 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
10 #include "chrome/test/testing_profile.h" 9 #include "chrome/test/testing_profile.h"
11 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 12
14 // A mock ThemeSource (so we can override SendResponse to get at its data). 13 // A mock ThemeSource (so we can override SendResponse to get at its data).
15 class MockThemeSource : public DOMUIThemeSource { 14 class MockThemeSource : public DOMUIThemeSource {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 80
82 theme_source()->StartDataRequest("css/newtab.css?pie", 3); 81 theme_source()->StartDataRequest("css/newtab.css?pie", 3);
83 EXPECT_EQ(theme_source()->result_request_id_, 3); 82 EXPECT_EQ(theme_source()->result_request_id_, 3);
84 EXPECT_NE(theme_source()->result_data_size_, empty_size); 83 EXPECT_NE(theme_source()->result_data_size_, empty_size);
85 84
86 // Check that we send NULL back when we can't find what we're looking for. 85 // Check that we send NULL back when we can't find what we're looking for.
87 theme_source()->StartDataRequest("css/WRONGURL", 7); 86 theme_source()->StartDataRequest("css/WRONGURL", 7);
88 EXPECT_EQ(theme_source()->result_request_id_, 7); 87 EXPECT_EQ(theme_source()->result_request_id_, 7);
89 EXPECT_EQ(theme_source()->result_data_size_, empty_size); 88 EXPECT_EQ(theme_source()->result_data_size_, empty_size);
90 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698