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

Side by Side Diff: chrome/browser/profile_resetter/jtl_interpreter_unittest.cc

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/profile_resetter/jtl_interpreter.h" 5 #include "chrome/browser/profile_resetter/jtl_interpreter.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/test/values_test_util.h" 10 #include "base/test/values_test_util.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 { VALUE_TRUE, "{ 'KEY_HASH_1': true }", true }, 216 { VALUE_TRUE, "{ 'KEY_HASH_1': true }", true },
217 { VALUE_FALSE, "{ 'KEY_HASH_1': false }", true }, 217 { VALUE_FALSE, "{ 'KEY_HASH_1': false }", true },
218 { VALUE_TRUE, "{ 'KEY_HASH_1': false }", false }, 218 { VALUE_TRUE, "{ 'KEY_HASH_1': false }", false },
219 { VALUE_TRUE, "{ 'KEY_HASH_1': 'abc' }", false }, 219 { VALUE_TRUE, "{ 'KEY_HASH_1': 'abc' }", false },
220 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false }, 220 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false },
221 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.2 }", false }, 221 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.2 }", false },
222 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false }, 222 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false },
223 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 223 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false },
224 }; 224 };
225 225
226 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 226 for (size_t i = 0; i < arraysize(cases); ++i) {
227 SCOPED_TRACE(testing::Message() << "Iteration " << i); 227 SCOPED_TRACE(testing::Message() << "Iteration " << i);
228 INIT_INTERPRETER( 228 INIT_INTERPRETER(
229 OP_NAVIGATE(KEY_HASH_1) + 229 OP_NAVIGATE(KEY_HASH_1) +
230 OP_COMPARE_NODE_BOOL(cases[i].expected_value) + 230 OP_COMPARE_NODE_BOOL(cases[i].expected_value) +
231 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE), 231 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE),
232 cases[i].json); 232 cases[i].json);
233 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 233 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
234 if (cases[i].expected_success) { 234 if (cases[i].expected_success) {
235 base::ExpectDictBooleanValue( 235 base::ExpectDictBooleanValue(
236 true, *interpreter.working_memory(), VAR_HASH_1); 236 true, *interpreter.working_memory(), VAR_HASH_1);
(...skipping 27 matching lines...) Expand all
264 264
265 { GetHash("1"), "{ 'KEY_HASH_1': 1 }", true }, 265 { GetHash("1"), "{ 'KEY_HASH_1': 1 }", true },
266 { GetHash("1"), "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false }, 266 { GetHash("1"), "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false },
267 { GetHash("1"), "{ 'KEY_HASH_1': true }", false }, 267 { GetHash("1"), "{ 'KEY_HASH_1': true }", false },
268 { GetHash("1"), "{ 'KEY_HASH_1': 2 }", false }, 268 { GetHash("1"), "{ 'KEY_HASH_1': 2 }", false },
269 { GetHash("1"), "{ 'KEY_HASH_1': 1.1 }", false }, 269 { GetHash("1"), "{ 'KEY_HASH_1': 1.1 }", false },
270 { GetHash("1"), "{ 'KEY_HASH_1': [1] }", false }, 270 { GetHash("1"), "{ 'KEY_HASH_1': [1] }", false },
271 { GetHash("1"), "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 271 { GetHash("1"), "{ 'KEY_HASH_1': {'a': 'b'} }", false },
272 }; 272 };
273 273
274 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 274 for (size_t i = 0; i < arraysize(cases); ++i) {
275 SCOPED_TRACE(testing::Message() << "Iteration " << i); 275 SCOPED_TRACE(testing::Message() << "Iteration " << i);
276 INIT_INTERPRETER( 276 INIT_INTERPRETER(
277 OP_NAVIGATE(KEY_HASH_1) + 277 OP_NAVIGATE(KEY_HASH_1) +
278 OP_COMPARE_NODE_HASH(cases[i].expected_value) + 278 OP_COMPARE_NODE_HASH(cases[i].expected_value) +
279 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE), 279 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE),
280 cases[i].json); 280 cases[i].json);
281 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 281 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
282 if (cases[i].expected_success) { 282 if (cases[i].expected_success) {
283 base::ExpectDictBooleanValue( 283 base::ExpectDictBooleanValue(
284 true, *interpreter.working_memory(), VAR_HASH_1); 284 true, *interpreter.working_memory(), VAR_HASH_1);
285 } else { 285 } else {
286 EXPECT_FALSE(interpreter.working_memory()->HasKey(VAR_HASH_1)); 286 EXPECT_FALSE(interpreter.working_memory()->HasKey(VAR_HASH_1));
287 } 287 }
288 } 288 }
289 289
290 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 290 for (size_t i = 0; i < arraysize(cases); ++i) {
291 SCOPED_TRACE(testing::Message() << "Negated, Iteration " << i); 291 SCOPED_TRACE(testing::Message() << "Negated, Iteration " << i);
292 INIT_INTERPRETER( 292 INIT_INTERPRETER(
293 OP_NAVIGATE(KEY_HASH_1) + 293 OP_NAVIGATE(KEY_HASH_1) +
294 OP_COMPARE_NODE_HASH_NOT(cases[i].expected_value) + 294 OP_COMPARE_NODE_HASH_NOT(cases[i].expected_value) +
295 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE), 295 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE),
296 cases[i].json); 296 cases[i].json);
297 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 297 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
298 if (!cases[i].expected_success) { 298 if (!cases[i].expected_success) {
299 base::ExpectDictBooleanValue( 299 base::ExpectDictBooleanValue(
300 true, *interpreter.working_memory(), VAR_HASH_1); 300 true, *interpreter.working_memory(), VAR_HASH_1);
(...skipping 11 matching lines...) Expand all
312 } cases[] = { 312 } cases[] = {
313 { true, "{ 'KEY_HASH_1': true }", true }, 313 { true, "{ 'KEY_HASH_1': true }", true },
314 { false, "{ 'KEY_HASH_1': false }", true }, 314 { false, "{ 'KEY_HASH_1': false }", true },
315 { false, "{ 'KEY_HASH_1': 'abc' }", false }, 315 { false, "{ 'KEY_HASH_1': 'abc' }", false },
316 { false, "{ 'KEY_HASH_1': 1 }", false }, 316 { false, "{ 'KEY_HASH_1': 1 }", false },
317 { false, "{ 'KEY_HASH_1': 1.2 }", false }, 317 { false, "{ 'KEY_HASH_1': 1.2 }", false },
318 { false, "{ 'KEY_HASH_1': [1] }", false }, 318 { false, "{ 'KEY_HASH_1': [1] }", false },
319 { false, "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 319 { false, "{ 'KEY_HASH_1': {'a': 'b'} }", false },
320 }; 320 };
321 321
322 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 322 for (size_t i = 0; i < arraysize(cases); ++i) {
323 SCOPED_TRACE(testing::Message() << "Iteration " << i); 323 SCOPED_TRACE(testing::Message() << "Iteration " << i);
324 INIT_INTERPRETER( 324 INIT_INTERPRETER(
325 OP_NAVIGATE(KEY_HASH_1) + 325 OP_NAVIGATE(KEY_HASH_1) +
326 OP_STORE_NODE_BOOL(VAR_HASH_1) + 326 OP_STORE_NODE_BOOL(VAR_HASH_1) +
327 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE), 327 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE),
328 cases[i].json); 328 cases[i].json);
329 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 329 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
330 if (cases[i].expected_success) { 330 if (cases[i].expected_success) {
331 base::ExpectDictBooleanValue( 331 base::ExpectDictBooleanValue(
332 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1); 332 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1);
(...skipping 25 matching lines...) Expand all
358 { GetHash("1"), "{ 'KEY_HASH_1': true }", false }, 358 { GetHash("1"), "{ 'KEY_HASH_1': true }", false },
359 { GetHash("1.2"), "{ 'KEY_HASH_1': true }", false }, 359 { GetHash("1.2"), "{ 'KEY_HASH_1': true }", false },
360 360
361 { VALUE_TRUE, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false }, 361 { VALUE_TRUE, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false },
362 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false }, 362 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false },
363 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.2 }", false }, 363 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.2 }", false },
364 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false }, 364 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false },
365 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 365 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false },
366 }; 366 };
367 367
368 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 368 for (size_t i = 0; i < arraysize(cases); ++i) {
369 SCOPED_TRACE(testing::Message() << "Iteration " << i); 369 SCOPED_TRACE(testing::Message() << "Iteration " << i);
370 std::string store_op; 370 std::string store_op;
371 if (cases[i].stored_value == VALUE_TRUE || 371 if (cases[i].stored_value == VALUE_TRUE ||
372 cases[i].stored_value == VALUE_FALSE) 372 cases[i].stored_value == VALUE_FALSE)
373 store_op = OP_STORE_BOOL(VAR_HASH_1, cases[i].stored_value); 373 store_op = OP_STORE_BOOL(VAR_HASH_1, cases[i].stored_value);
374 else if (!cases[i].stored_value.empty()) 374 else if (!cases[i].stored_value.empty())
375 store_op = OP_STORE_HASH(VAR_HASH_1, cases[i].stored_value); 375 store_op = OP_STORE_HASH(VAR_HASH_1, cases[i].stored_value);
376 INIT_INTERPRETER( 376 INIT_INTERPRETER(
377 store_op + 377 store_op +
378 OP_NAVIGATE(KEY_HASH_1) + 378 OP_NAVIGATE(KEY_HASH_1) +
(...skipping 18 matching lines...) Expand all
397 } cases[] = { 397 } cases[] = {
398 { VALUE_HASH_1, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", true }, 398 { VALUE_HASH_1, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", true },
399 { VALUE_HASH_2, "{ 'KEY_HASH_1': 'VALUE_HASH_2' }", true }, 399 { VALUE_HASH_2, "{ 'KEY_HASH_1': 'VALUE_HASH_2' }", true },
400 { GetHash("1"), "{ 'KEY_HASH_1': 1 }", true }, 400 { GetHash("1"), "{ 'KEY_HASH_1': 1 }", true },
401 { GetHash("1.2"), "{ 'KEY_HASH_1': 1.2 }", true }, 401 { GetHash("1.2"), "{ 'KEY_HASH_1': 1.2 }", true },
402 { std::string(), "{ 'KEY_HASH_1': true }", false }, 402 { std::string(), "{ 'KEY_HASH_1': true }", false },
403 { std::string(), "{ 'KEY_HASH_1': [1] }", false }, 403 { std::string(), "{ 'KEY_HASH_1': [1] }", false },
404 { std::string(), "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 404 { std::string(), "{ 'KEY_HASH_1': {'a': 'b'} }", false },
405 }; 405 };
406 406
407 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 407 for (size_t i = 0; i < arraysize(cases); ++i) {
408 SCOPED_TRACE(testing::Message() << "Iteration " << i); 408 SCOPED_TRACE(testing::Message() << "Iteration " << i);
409 INIT_INTERPRETER( 409 INIT_INTERPRETER(
410 OP_NAVIGATE(KEY_HASH_1) + 410 OP_NAVIGATE(KEY_HASH_1) +
411 OP_STORE_NODE_HASH(VAR_HASH_1) + 411 OP_STORE_NODE_HASH(VAR_HASH_1) +
412 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE), 412 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE),
413 cases[i].json); 413 cases[i].json);
414 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 414 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
415 if (cases[i].expected_success) { 415 if (cases[i].expected_success) {
416 base::ExpectDictStringValue( 416 base::ExpectDictStringValue(
417 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1); 417 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 { VALUE_TRUE, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false }, 463 { VALUE_TRUE, "{ 'KEY_HASH_1': 'VALUE_HASH_1' }", false },
464 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false }, 464 { VALUE_TRUE, "{ 'KEY_HASH_1': 1 }", false },
465 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.3 }", false }, 465 { VALUE_TRUE, "{ 'KEY_HASH_1': 1.3 }", false },
466 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false }, 466 { VALUE_TRUE, "{ 'KEY_HASH_1': [1] }", false },
467 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 467 { VALUE_TRUE, "{ 'KEY_HASH_1': {'a': 'b'} }", false },
468 468
469 { VALUE_TRUE, "{ 'KEY_HASH_1': true }", false }, 469 { VALUE_TRUE, "{ 'KEY_HASH_1': true }", false },
470 { VALUE_FALSE, "{ 'KEY_HASH_1': false }", false }, 470 { VALUE_FALSE, "{ 'KEY_HASH_1': false }", false },
471 }; 471 };
472 472
473 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 473 for (size_t i = 0; i < arraysize(cases); ++i) {
474 SCOPED_TRACE(testing::Message() << "Iteration " << i); 474 SCOPED_TRACE(testing::Message() << "Iteration " << i);
475 std::string store_op; 475 std::string store_op;
476 if (cases[i].stored_value == VALUE_TRUE || 476 if (cases[i].stored_value == VALUE_TRUE ||
477 cases[i].stored_value == VALUE_FALSE) 477 cases[i].stored_value == VALUE_FALSE)
478 store_op = OP_STORE_BOOL(VAR_HASH_1, cases[i].stored_value); 478 store_op = OP_STORE_BOOL(VAR_HASH_1, cases[i].stored_value);
479 else if (!cases[i].stored_value.empty()) 479 else if (!cases[i].stored_value.empty())
480 store_op = OP_STORE_HASH(VAR_HASH_1, cases[i].stored_value); 480 store_op = OP_STORE_HASH(VAR_HASH_1, cases[i].stored_value);
481 INIT_INTERPRETER( 481 INIT_INTERPRETER(
482 store_op + 482 store_op +
483 OP_NAVIGATE(KEY_HASH_1) + 483 OP_NAVIGATE(KEY_HASH_1) +
(...skipping 24 matching lines...) Expand all
508 { "acd", "{ 'KEY_HASH_1': 'abcdefghijklmnopqrstuvwxyz' }", false }, 508 { "acd", "{ 'KEY_HASH_1': 'abcdefghijklmnopqrstuvwxyz' }", false },
509 { "waaaaaaay_too_long", "{ 'KEY_HASH_1': 'abc' }", false }, 509 { "waaaaaaay_too_long", "{ 'KEY_HASH_1': 'abc' }", false },
510 510
511 { VALUE_HASH_1, "{ 'KEY_HASH_1': true }", false }, 511 { VALUE_HASH_1, "{ 'KEY_HASH_1': true }", false },
512 { VALUE_HASH_1, "{ 'KEY_HASH_1': 1 }", false }, 512 { VALUE_HASH_1, "{ 'KEY_HASH_1': 1 }", false },
513 { VALUE_HASH_1, "{ 'KEY_HASH_1': 1.1 }", false }, 513 { VALUE_HASH_1, "{ 'KEY_HASH_1': 1.1 }", false },
514 { VALUE_HASH_1, "{ 'KEY_HASH_1': [1] }", false }, 514 { VALUE_HASH_1, "{ 'KEY_HASH_1': [1] }", false },
515 { VALUE_HASH_1, "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 515 { VALUE_HASH_1, "{ 'KEY_HASH_1': {'a': 'b'} }", false },
516 }; 516 };
517 517
518 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 518 for (size_t i = 0; i < arraysize(cases); ++i) {
519 SCOPED_TRACE(testing::Message() << "Iteration " << i); 519 SCOPED_TRACE(testing::Message() << "Iteration " << i);
520 std::string pattern = cases[i].pattern; 520 std::string pattern = cases[i].pattern;
521 uint32 pattern_sum = std::accumulate( 521 uint32 pattern_sum = std::accumulate(
522 pattern.begin(), pattern.end(), static_cast<uint32>(0u)); 522 pattern.begin(), pattern.end(), static_cast<uint32>(0u));
523 INIT_INTERPRETER( 523 INIT_INTERPRETER(
524 OP_NAVIGATE(KEY_HASH_1) + 524 OP_NAVIGATE(KEY_HASH_1) +
525 OP_COMPARE_NODE_SUBSTRING(GetHash(pattern), 525 OP_COMPARE_NODE_SUBSTRING(GetHash(pattern),
526 EncodeUint32(pattern.size()), 526 EncodeUint32(pattern.size()),
527 EncodeUint32(pattern_sum)) + 527 EncodeUint32(pattern_sum)) +
528 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE), 528 OP_STORE_BOOL(VAR_HASH_1, VALUE_TRUE),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 { std::string(), "{ 'KEY_HASH_1': 'http://127.0.0.1/path' }", false }, 562 { std::string(), "{ 'KEY_HASH_1': 'http://127.0.0.1/path' }", false },
563 { std::string(), "{ 'KEY_HASH_1': 'file:///C:/bar.html' }", false }, 563 { std::string(), "{ 'KEY_HASH_1': 'file:///C:/bar.html' }", false },
564 564
565 { std::string(), "{ 'KEY_HASH_1': 1 }", false }, 565 { std::string(), "{ 'KEY_HASH_1': 1 }", false },
566 { std::string(), "{ 'KEY_HASH_1': 1.2 }", false }, 566 { std::string(), "{ 'KEY_HASH_1': 1.2 }", false },
567 { std::string(), "{ 'KEY_HASH_1': true }", false }, 567 { std::string(), "{ 'KEY_HASH_1': true }", false },
568 { std::string(), "{ 'KEY_HASH_1': [1] }", false }, 568 { std::string(), "{ 'KEY_HASH_1': [1] }", false },
569 { std::string(), "{ 'KEY_HASH_1': {'a': 'b'} }", false }, 569 { std::string(), "{ 'KEY_HASH_1': {'a': 'b'} }", false },
570 }; 570 };
571 571
572 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 572 for (size_t i = 0; i < arraysize(cases); ++i) {
573 SCOPED_TRACE(testing::Message() << "Iteration " << i); 573 SCOPED_TRACE(testing::Message() << "Iteration " << i);
574 INIT_INTERPRETER( 574 INIT_INTERPRETER(
575 OP_NAVIGATE(KEY_HASH_1) + 575 OP_NAVIGATE(KEY_HASH_1) +
576 OP_STORE_NODE_REGISTERABLE_DOMAIN_HASH(VAR_HASH_1) + 576 OP_STORE_NODE_REGISTERABLE_DOMAIN_HASH(VAR_HASH_1) +
577 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE), 577 OP_STORE_BOOL(VAR_HASH_2, VALUE_TRUE),
578 cases[i].json); 578 cases[i].json);
579 EXPECT_EQ(JtlInterpreter::OK, interpreter.result()); 579 EXPECT_EQ(JtlInterpreter::OK, interpreter.result());
580 if (cases[i].expected_success) { 580 if (cases[i].expected_success) {
581 base::ExpectDictStringValue( 581 base::ExpectDictStringValue(
582 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1); 582 cases[i].expected_value, *interpreter.working_memory(), VAR_HASH_1);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 TEST(JtlInterpreter, CalculateProgramChecksum) { 680 TEST(JtlInterpreter, CalculateProgramChecksum) {
681 const char kTestSeed[] = "Irrelevant seed value."; 681 const char kTestSeed[] = "Irrelevant seed value.";
682 const char kTestProgram[] = "The quick brown fox jumps over the lazy dog."; 682 const char kTestProgram[] = "The quick brown fox jumps over the lazy dog.";
683 // This program is invalid, but we are not actually executing it. 683 // This program is invalid, but we are not actually executing it.
684 base::DictionaryValue input; 684 base::DictionaryValue input;
685 JtlInterpreter interpreter(kTestSeed, kTestProgram, &input); 685 JtlInterpreter interpreter(kTestSeed, kTestProgram, &input);
686 EXPECT_EQ(0xef537f, interpreter.CalculateProgramChecksum()); 686 EXPECT_EQ(0xef537f, interpreter.CalculateProgramChecksum());
687 } 687 }
688 688
689 } // namespace 689 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_unittest.cc ('k') | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698