| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/numerics/safe_math.h" | 9 #include "base/numerics/safe_math.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); | 283 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); |
| 284 | 284 |
| 285 input = base::MakeUnique<base::Value>(1.23); | 285 input = base::MakeUnique<base::Value>(1.23); |
| 286 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); | 286 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); |
| 287 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); | 287 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); |
| 288 | 288 |
| 289 input = base::MakeUnique<base::Value>(false); | 289 input = base::MakeUnique<base::Value>(false); |
| 290 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); | 290 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); |
| 291 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); | 291 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); |
| 292 | 292 |
| 293 input = base::MakeUnique<base::StringValue>("test string"); | 293 input = base::MakeUnique<base::Value>("test string"); |
| 294 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); | 294 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); |
| 295 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); | 295 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); |
| 296 | 296 |
| 297 input = base::BinaryValue::CreateWithCopiedBuffer("mojo", 4); | 297 input = base::BinaryValue::CreateWithCopiedBuffer("mojo", 4); |
| 298 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); | 298 ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); |
| 299 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); | 299 EXPECT_TRUE(base::Value::Equals(input.get(), output.get())); |
| 300 | 300 |
| 301 auto dict = base::MakeUnique<base::DictionaryValue>(); | 301 auto dict = base::MakeUnique<base::DictionaryValue>(); |
| 302 dict->SetBoolean("bool", false); | 302 dict->SetBoolean("bool", false); |
| 303 dict->SetInteger("int", 2); | 303 dict->SetInteger("int", 2); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 for (size_t i = 0; i < arraysize(kTestDirections); i++) { | 424 for (size_t i = 0; i < arraysize(kTestDirections); i++) { |
| 425 base::i18n::TextDirection direction_out; | 425 base::i18n::TextDirection direction_out; |
| 426 ASSERT_TRUE(ptr->BounceTextDirection(kTestDirections[i], &direction_out)); | 426 ASSERT_TRUE(ptr->BounceTextDirection(kTestDirections[i], &direction_out)); |
| 427 EXPECT_EQ(kTestDirections[i], direction_out); | 427 EXPECT_EQ(kTestDirections[i], direction_out); |
| 428 } | 428 } |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace test | 431 } // namespace test |
| 432 } // namespace common | 432 } // namespace common |
| 433 } // namespace mojo | 433 } // namespace mojo |
| OLD | NEW |