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

Side by Side Diff: chrome/common/extensions/extension_unpacker_unittest.cc

Issue 10035042: Rewrite base::JSONReader to be 35-40% faster, depending on the input string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix Windows, address comments Created 8 years, 7 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Crashes intermittently on Windows, see http://crbug.com/109738 96 // Crashes intermittently on Windows, see http://crbug.com/109738
97 #if defined(OS_WIN) 97 #if defined(OS_WIN)
98 #define MAYBE_InvalidMessagesFile DISABLED_InvalidMessagesFile 98 #define MAYBE_InvalidMessagesFile DISABLED_InvalidMessagesFile
99 #else 99 #else
100 #define MAYBE_InvalidMessagesFile InvalidMessagesFile 100 #define MAYBE_InvalidMessagesFile InvalidMessagesFile
101 #endif 101 #endif
102 TEST_F(ExtensionUnpackerTest, MAYBE_InvalidMessagesFile) { 102 TEST_F(ExtensionUnpackerTest, MAYBE_InvalidMessagesFile) {
103 SetupUnpacker("invalid_messages_file.crx"); 103 SetupUnpacker("invalid_messages_file.crx");
104 EXPECT_FALSE(unpacker_->Run()); 104 EXPECT_FALSE(unpacker_->Run());
105 EXPECT_TRUE(MatchPattern(unpacker_->error_message(), 105 EXPECT_TRUE(MatchPattern(unpacker_->error_message(),
106 ASCIIToUTF16("*_locales?en_US?messages.json: Line: 2, column: 3," 106 ASCIIToUTF16("*_locales?en_US?messages.json: Line: 2, column: 11,"
107 " Dictionary keys must be quoted."))); 107 " Syntax error."))) << unpacker_->error_message();
108 } 108 }
109 109
110 // Crashes intermittently on Vista, see http://crbug.com/109238 110 // Crashes intermittently on Vista, see http://crbug.com/109238
111 #if defined(OS_WIN) 111 #if defined(OS_WIN)
112 #define MAYBE_MissingDefaultData DISABLED_MissingDefaultData 112 #define MAYBE_MissingDefaultData DISABLED_MissingDefaultData
113 #else 113 #else
114 #define MAYBE_MissingDefaultData MissingDefaultData 114 #define MAYBE_MissingDefaultData MissingDefaultData
115 #endif 115 #endif
116 TEST_F(ExtensionUnpackerTest, MAYBE_MissingDefaultData) { 116 TEST_F(ExtensionUnpackerTest, MAYBE_MissingDefaultData) {
117 SetupUnpacker("missing_default_data.crx"); 117 SetupUnpacker("missing_default_data.crx");
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 #define MAYBE_NoL10n DISABLED_NoL10n 180 #define MAYBE_NoL10n DISABLED_NoL10n
181 #else 181 #else
182 #define MAYBE_NoL10n NoL10n 182 #define MAYBE_NoL10n NoL10n
183 #endif 183 #endif
184 TEST_F(ExtensionUnpackerTest, MAYBE_NoL10n) { 184 TEST_F(ExtensionUnpackerTest, MAYBE_NoL10n) {
185 SetupUnpacker("no_l10n.crx"); 185 SetupUnpacker("no_l10n.crx");
186 EXPECT_TRUE(unpacker_->Run()); 186 EXPECT_TRUE(unpacker_->Run());
187 EXPECT_TRUE(unpacker_->error_message().empty()); 187 EXPECT_TRUE(unpacker_->error_message().empty());
188 EXPECT_EQ(0U, unpacker_->parsed_catalogs()->size()); 188 EXPECT_EQ(0U, unpacker_->parsed_catalogs()->size());
189 } 189 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_l10n_util_unittest.cc ('k') | chrome/common/net/gaia/oauth2_mint_token_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698