| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
| 10 #include "base/scoped_vector.h" | 10 #include "base/scoped_vector.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 DictionaryValue* info; | 442 DictionaryValue* info; |
| 443 ASSERT_TRUE(list->GetDictionary(0, &info)); | 443 ASSERT_TRUE(list->GetDictionary(0, &info)); |
| 444 | 444 |
| 445 int tmp_id = 0; | 445 int tmp_id = 0; |
| 446 ASSERT_TRUE(info->GetInteger(L"menuItemId", &tmp_id)); | 446 ASSERT_TRUE(info->GetInteger(L"menuItemId", &tmp_id)); |
| 447 ASSERT_EQ(id.second, tmp_id); | 447 ASSERT_EQ(id.second, tmp_id); |
| 448 | 448 |
| 449 std::string tmp; | 449 std::string tmp; |
| 450 ASSERT_TRUE(info->GetString(L"mediaType", &tmp)); | 450 ASSERT_TRUE(info->GetString(L"mediaType", &tmp)); |
| 451 ASSERT_EQ("IMAGE", tmp); | 451 ASSERT_EQ("image", tmp); |
| 452 ASSERT_TRUE(info->GetString(L"srcUrl", &tmp)); | 452 ASSERT_TRUE(info->GetString(L"srcUrl", &tmp)); |
| 453 ASSERT_EQ(params.src_url.spec(), tmp); | 453 ASSERT_EQ(params.src_url.spec(), tmp); |
| 454 ASSERT_TRUE(info->GetString(L"mainFrameUrl", &tmp)); | 454 ASSERT_TRUE(info->GetString(L"pageUrl", &tmp)); |
| 455 ASSERT_EQ(params.page_url.spec(), tmp); | 455 ASSERT_EQ(params.page_url.spec(), tmp); |
| 456 | 456 |
| 457 std::wstring wide_tmp; | 457 std::wstring wide_tmp; |
| 458 ASSERT_TRUE(info->GetString(L"selectionText", &wide_tmp)); | 458 ASSERT_TRUE(info->GetString(L"selectionText", &wide_tmp)); |
| 459 ASSERT_EQ(params.selection_text, wide_tmp); | 459 ASSERT_EQ(params.selection_text, wide_tmp); |
| 460 | 460 |
| 461 bool bool_tmp = true; | 461 bool bool_tmp = true; |
| 462 ASSERT_TRUE(info->GetBoolean(L"editable", &bool_tmp)); | 462 ASSERT_TRUE(info->GetBoolean(L"editable", &bool_tmp)); |
| 463 ASSERT_EQ(params.is_editable, bool_tmp); | 463 ASSERT_EQ(params.is_editable, bool_tmp); |
| 464 } | 464 } |
| OLD | NEW |