| 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/utility_process_host.h" | 7 #include "chrome/browser/utility_process_host.h" |
| 8 #include "chrome/common/indexed_db_key.h" | |
| 9 #include "chrome/common/serialized_script_value.h" | |
| 10 #include "chrome/test/in_process_browser_test.h" | 8 #include "chrome/test/in_process_browser_test.h" |
| 11 #include "chrome/test/ui_test_utils.h" | 9 #include "chrome/test/ui_test_utils.h" |
| 12 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 10 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 11 #include "content/common/indexed_db_key.h" |
| 12 #include "content/common/serialized_script_value.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 16 #include "webkit/glue/idb_bindings.h" | 16 #include "webkit/glue/idb_bindings.h" |
| 17 #include "webkit/glue/web_io_operators.h" | 17 #include "webkit/glue/web_io_operators.h" |
| 18 | 18 |
| 19 using WebKit::WebSerializedScriptValue; | 19 using WebKit::WebSerializedScriptValue; |
| 20 | 20 |
| 21 // Sanity test, check the function call directly outside the sandbox. | 21 // Sanity test, check the function call directly outside the sandbox. |
| 22 TEST(IDBKeyPathWithoutSandbox, Value) { | 22 TEST(IDBKeyPathWithoutSandbox, Value) { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 string16(expected_data, | 323 string16(expected_data, |
| 324 arraysize(expected_data))); | 324 arraysize(expected_data))); |
| 325 | 325 |
| 326 ScopedIDBKeyPathHelper scoped_helper; | 326 ScopedIDBKeyPathHelper scoped_helper; |
| 327 scoped_helper.SetExpectedValue(expected_value); | 327 scoped_helper.SetExpectedValue(expected_value); |
| 328 scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bar")); | 328 scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bar")); |
| 329 | 329 |
| 330 scoped_helper.SetExpectedValue(SerializedScriptValue()); // Expect null. | 330 scoped_helper.SetExpectedValue(SerializedScriptValue()); // Expect null. |
| 331 scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bad.key.path")); | 331 scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bad.key.path")); |
| 332 } | 332 } |
| OLD | NEW |