OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "FrameTestHelpers.h" | 29 #include "FrameTestHelpers.h" |
30 #include "IDBBindingUtilities.h" | 30 #include "IDBBindingUtilities.h" |
31 #include "IDBKey.h" | 31 #include "IDBKey.h" |
32 #include "IDBKeyPath.h" | 32 #include "IDBKeyPath.h" |
33 #include "V8Binding.h" | 33 #include "V8Binding.h" |
34 #include "V8PerIsolateData.h" | 34 #include "V8PerIsolateData.h" |
35 #include "V8Utilities.h" | 35 #include "V8Utilities.h" |
36 #include "WebFrame.h" | 36 #include "WebFrame.h" |
37 #include "WebFrameImpl.h" | 37 #include "WebFrameImpl.h" |
38 #include "WebView.h" | 38 #include "WebView.h" |
39 #include "WorldContextHandle.h" | |
40 | 39 |
41 #include <gtest/gtest.h> | 40 #include <gtest/gtest.h> |
42 #include <wtf/Vector.h> | 41 #include <wtf/Vector.h> |
43 | 42 |
44 using namespace WebCore; | 43 using namespace WebCore; |
45 using namespace WebKit; | 44 using namespace WebKit; |
46 | 45 |
47 namespace { | 46 namespace { |
48 | 47 |
49 PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(const ScriptValue& value,
const String& keyPath) | 48 PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(const ScriptValue& value,
const String& keyPath) |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 checkInjection(IDBKey::createDate(4567), scriptObject, "foo.baz"); | 201 checkInjection(IDBKey::createDate(4567), scriptObject, "foo.baz"); |
203 checkInjection(IDBKey::createDate(4567), scriptObject, "bar"); | 202 checkInjection(IDBKey::createDate(4567), scriptObject, "bar"); |
204 checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "foo.b
az"); | 203 checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "foo.b
az"); |
205 checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "bar")
; | 204 checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "bar")
; |
206 | 205 |
207 checkInjectionFails(IDBKey::createString("zoo"), scriptObject, "foo.bar.baz"
); | 206 checkInjectionFails(IDBKey::createString("zoo"), scriptObject, "foo.bar.baz"
); |
208 checkInjection(IDBKey::createString("zoo"), scriptObject, "foo.xyz.foo"); | 207 checkInjection(IDBKey::createString("zoo"), scriptObject, "foo.xyz.foo"); |
209 } | 208 } |
210 | 209 |
211 } // namespace | 210 } // namespace |
OLD | NEW |