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

Side by Side Diff: chrome/browser/extensions/image_loading_tracker_unittest.cc

Issue 6766002: Replace bools in extension creation with flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/extensions/image_loading_tracker.h" 7 #include "chrome/browser/extensions/image_loading_tracker.h"
8 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "chrome/common/extensions/extension_icon_set.h" 10 #include "chrome/common/extensions/extension_icon_set.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code, 67 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code,
68 &error))); 68 &error)));
69 EXPECT_EQ(0, error_code) << error; 69 EXPECT_EQ(0, error_code) << error;
70 if (error_code != 0) 70 if (error_code != 0)
71 return NULL; 71 return NULL;
72 72
73 EXPECT_TRUE(valid_value.get()); 73 EXPECT_TRUE(valid_value.get());
74 if (!valid_value.get()) 74 if (!valid_value.get())
75 return NULL; 75 return NULL;
76 76
77 return Extension::Create( 77 return Extension::Create(test_file, Extension::INVALID, *valid_value,
78 test_file, Extension::INVALID, *valid_value, false, true, &error); 78 Extension::STRICT_ERROR_CHECKS, &error);
79 } 79 }
80 80
81 SkBitmap image_; 81 SkBitmap image_;
82 82
83 private: 83 private:
84 virtual void SetUp() { 84 virtual void SetUp() {
85 file_thread_.Start(); 85 file_thread_.Start();
86 io_thread_.Start(); 86 io_thread_.Start();
87 } 87 }
88 88
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 WaitForImageLoad(); 174 WaitForImageLoad();
175 175
176 // Even though we deleted the extension, we should still get the image. 176 // Even though we deleted the extension, we should still get the image.
177 // We should still have gotten the image. 177 // We should still have gotten the image.
178 EXPECT_EQ(1, image_loaded_count()); 178 EXPECT_EQ(1, image_loaded_count());
179 179
180 // Check that the image was loaded. 180 // Check that the image was loaded.
181 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width()); 181 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width());
182 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698