| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Tests for CppBoundClass, in conjunction with CppBindingExample. Binds | 5 // Tests for CppBoundClass, in conjunction with CppBindingExample. Binds |
| 6 // a CppBindingExample class into JavaScript in a custom test shell and tests | 6 // a CppBindingExample class into JavaScript in a custom test shell and tests |
| 7 // the binding from the outside by loading JS into the shell. | 7 // the binding from the outside by loading JS into the shell. |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" |
| 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 19 #include "webkit/glue/cpp_binding_example.h" | 19 #include "webkit/glue/cpp_binding_example.h" |
| 20 #include "webkit/glue/webkit_glue.h" | 20 #include "webkit/glue/webkit_glue.h" |
| 21 #include "webkit/tools/test_shell/test_shell_test.h" | 21 #include "webkit/tools/test_shell/test_shell_test.h" |
| 22 | 22 |
| 23 using WebKit::WebFrame; | 23 using WebKit::WebFrame; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 class CppBindingExampleSubObject : public CppBindingExample { | 27 class CppBindingExampleSubObject : public CppBindingExample { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 // Ensures existent methods can be invoked successfully when the fallback method | 285 // Ensures existent methods can be invoked successfully when the fallback method |
| 286 // is used | 286 // is used |
| 287 TEST_F(CppBoundClassWithFallbackMethodTest, | 287 TEST_F(CppBoundClassWithFallbackMethodTest, |
| 288 InvokeExistentMethodsWithFallback) { | 288 InvokeExistentMethodsWithFallback) { |
| 289 std::string js = BuildJSCondition("example.echoValue(34)", "34"); | 289 std::string js = BuildJSCondition("example.echoValue(34)", "34"); |
| 290 CheckJavaScriptSuccess(js); | 290 CheckJavaScriptSuccess(js); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace | 293 } // namespace |
| OLD | NEW |